Skip to main content

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 session
  • get_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 user
  • get_user(user_id=None) — get a user's profile data; defaults to the current user
  • set_username(username, verbose=False) — set the username for the authenticated user
  • get_user_profile_picture(user_id) — get a user's profile picture as a PIL Image
  • list_profile_photos(user_id) — list filenames of a user's profile photos in Firebase Storage
  • download_profile_photo(user_id, filename) — download a profile photo as a PIL Image
  • download_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 week
  • get_week_id(owner_id, media_id) — look up the week ID for a given post (tries existing comments, then walks profile weeks)
  • delete_media(week_id, media_id) — delete one of your own media items
  • get_media_metadata(user_id, week, filename) — get Firebase Storage metadata for a media file
  • list_files_in_folder(user_id, week) — list raw Storage response for a user's week folder
  • get_filenames_in_folder(user_id, week) — get filenames in a user's week folder
  • download_media_file(user_id, week, filename) — download a media file as a PIL Image
  • download_image(storage_path) — download any Firebase Storage file as a PIL Image

comments

  • get_media_comments(owner_id, media_id) — get all comments on a media item
  • post_comment(owner_id, media_id, text, week_id=None) — post a comment; pass week_id when known (required for comment to appear in app)

friends

  • get_friend_statuses(filter=None) — get all friend relationships; optionally pass a FieldFilter
  • send_friend_request(user_id, verbose=False) — send a friend request
  • cancel_friend_request(user_id, verbose=False) — cancel a pending outbound friend request
  • accept_friend_request(user_id, verbose=False) — accept an incoming friend request
  • reject_friend_request(user_id, verbose=False) — reject an incoming friend request
  • unfriend(user_id, verbose=False) — remove a friend
  • get_people_you_may_also_know(user_id, verbose=False) — get suggested friends

keys

  • send_key(user_id) — give your key to a friend
  • revoke_key(user_id) — take back a key you gave

albums

  • get_album(album_id) — get album metadata
  • get_album_media(album_id) — get all media in an album
  • create_album(name, members=[], cover_font="roslindale", verbose=False) — create a new album
  • add_album_member(album_id, user_ids) — add members to an album
  • remove_album_member(album_id, user_id) — remove a member from an album
  • make_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 returns isNew

utilities

  • get_auth_token() — returns the current auth token, refreshing if expired
  • get_auth_header() — returns the Firebase auth header dict for manual requests

Project details


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.2.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

retro_sdk-0.2.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file retro_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: retro_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 9.1 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

Hashes for retro_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 228bb4ce06fa3473cde068efaca570f950c839e059d212b067b5d7699687c95d
MD5 d0cbc2d13f141d1ccdb8d9a1be11ac8f
BLAKE2b-256 de87942dfdfa91dbb88b24b3ed4a303e6e3d83920b651bcfddcf97b6ae09fc74

See more details on using hashes here.

File details

Details for the file retro_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: retro_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 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

Hashes for retro_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8914181a680af167f6b41141e58834a780256cb2bac23ecb52e1634e1ad7eb7
MD5 be8513a914bb2483ce3b263935a0ea4c
BLAKE2b-256 df9a71992e9f57222c7a808c2a8ba5bffb7ed21b210a7aa610bce7b81088e58a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page