python sdk for retro, the photo sharing app!
Project description
retro sdk
a python sdk for the internal retro apis!
authentication
send_code(phone_number, verbose=False)— send a verification SMS (international format, e.g.+18556254225)verify_code(code, phone_number=None, verbose=False)— verify the SMS code and authenticate the sessionget_refresh_token(token, verbose=False)— exchange a custom token for a refresh token and store it
users
get_current_user_id()— returns the UID of the authenticated userget_user(user_id=None)— get a user's profile data; defaults to the current userset_username(username, verbose=False)— set the username for the authenticated userget_user_profile_picture(user_id)— get a user's profile picture as a PIL Imagelist_profile_photos(user_id)— list filenames of a user's profile photos in Firebase Storagedownload_profile_photo(user_id, filename)— download a profile photo as a PIL Imagedownload_profile_photos(user_id)— download all profile photos for a user
media
get_week_media(user_id, week_id)— get all media items for a user and weekget_week_id(owner_id, media_id)— look up the week ID for a given post (tries existing comments, then walks profile weeks)upload_media(image, image_time=None)— upload a PIL Image as a new post;image_timeis a unix timestamp for when the photo was taken (determines the week andcreatedAt; defaults to now)delete_media(week_id, media_id)— delete one of your own media itemstag_user(media_id, week_id, user_id)— tag a user in one of your own postsuntag_user(media_id, week_id, user_id)— remove a tag from one of your own postsget_media_metadata(user_id, week, filename)— get Firebase Storage metadata for a media filelist_files_in_folder(user_id, week)— list raw Storage response for a user's week folderget_filenames_in_folder(user_id, week)— get filenames in a user's week folderdownload_media_file(user_id, week, filename)— download a media file as a PIL Imagedownload_image(storage_path)— download any Firebase Storage file as a PIL Image
comments & likes
get_media_comments(owner_id, media_id)— get all comments on a media itempost_comment(owner_id, media_id, week_id, text, media_url=None)— post a comment; fetchestargetMediaURLautomatically if not providedlike_media(owner_id, media_id, week_id, media_url=None)— like a media item; fetchestargetMediaURLautomatically if not providedunlike_media(owner_id, media_id)— remove a like
friends
get_friend_statuses(filter=None)— get all friend relationships; optionally pass aFieldFiltersend_friend_request(user_id, verbose=False)— send a friend requestcancel_friend_request(user_id, verbose=False)— cancel a pending outbound friend requestaccept_friend_request(user_id, verbose=False)— accept an incoming friend requestreject_friend_request(user_id, verbose=False)— reject an incoming friend requestunfriend(user_id, verbose=False)— remove a friendget_people_you_may_also_know(user_id, verbose=False)— get suggested friends
keys
send_key(user_id)— give your key to a friendrevoke_key(user_id)— take back a key you gave
albums
get_album(album_id)— get album metadataget_album_media(album_id)— get all media in an albumcreate_album(name, members=[], cover_font="roslindale", verbose=False)— create a new albumadd_album_member(album_id, user_ids)— add members to an albumremove_album_member(album_id, user_id)— remove a member from an albummake_album_admin(album_id, user_id)— promote a member to admin
notifications
get_notifications(type=None)— get activity notifications; optionally filter by"like","comment","request", or"tag"
search
search_users(username, page=0)— search for users by username via Algolia (no auth required)get_user_id(username)— look up a user's ID from their username
profile weeks
profile_weeks(user_id, verbose=False)— get the list of weeks a user has posted (requires friendship or key)profile_weeks_v2(user_id, verbose=False)— same as above, also returnsisNew
utilities
get_auth_token()— returns the current auth token, refreshing if expiredget_auth_header()— returns the Firebase auth header dict for manual requests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
retro_sdk-0.3.0.tar.gz
(10.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
retro_sdk-0.3.0-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file retro_sdk-0.3.0.tar.gz.
File metadata
- Download URL: retro_sdk-0.3.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
692892dc47b298afe11011a3ded2603eb93614806042c0764095ce4bd497f83c
|
|
| MD5 |
e875d4be2bb596a056bf0a9d8f0d80bc
|
|
| BLAKE2b-256 |
0c56d1ca27127b3e8c397a0d170d644cde1dbdfa6f6fd8ec39ef35426361eb81
|
File details
Details for the file retro_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: retro_sdk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c31f8827f3dc152579e15cd9b2a6712a10a4d25a6dabfc4b99243545cdff55b
|
|
| MD5 |
e232be91a4175db839aa28e86c609fb2
|
|
| BLAKE2b-256 |
102b0b6a82fe39510b9771ab25c61d4bd778b20edfcc4a87a22a80e394973c8f
|