Skip to content

VerifyBot/stips-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Stips API

A rich API wrapper for stips.co.il written in Python.

β›² Install

Install using pip (pypi):

pip install stipspy

πŸͺ΄ Usage

You can choose to use the API with or without logging in, but some methods will be unavailable without authentication.

Example without user authentication

# see the latest question

from stips import StipsClient

api = StipsClient()

questions = api.get_new_questions()
latest = questions[0]

print(f'{latest.title=}')
print(f'author: {latest.author.name if not latest.anonymous else "anonymous"}')
print(f'{latest.answer_count=}')

Example with authentication

# print unread messages

from stips import StipsClient

api = StipsClient(email=email, password=password)
# or
api = StipsClient(cookies=cookies)

new_messages_count = api.get_notifications_count().messages

print(f'Found {new_messages_count} unread message(s)')

if new_messages_count > 0:
  # this only covers first 28 chats
  # for better searching see pagetools.iterpages
  messages_list = api.get_messages_list(page=1)

  for direct in messages_list:
    if direct.new_messages_count > 0:
      print(f'{direct.new_messages_count} message(s) from {direct.from_user.name}: {direct.last_message}')

More examples in the /examples directory

πŸ“ƒ Documentation

You can find the documentation here:
https://verifybot.github.io/stipsapi-docs/stips.html

πŸ›£οΈ Roadmap

  • 🦸 Support all API endpoints
  • πŸ₯ Easy to use API
  • πŸ“ƒ Create documentation
  • 🚏 Handle API Ratelimit

πŸ™ Contributing

Feel free to post a pull request or an issue if you have any ideas, suggestions, or if you've found any bugs.

About

πŸ“— An API wrapper for Stips written in Python.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages