Skip to main content

An unofficial Python client library for the Poop Map API.

Project description

Poop Map Python API Client (Unofficial)

PyPI License: MIT

An unofficial, unaffiliated Python client for the Poop Map API. This library allows you to interact with Poop Map's backend, log in, fetch feeds, leagues, posts, comments, likes, and more.

Features

  • Authenticate with username and password
  • Fetch your feed and poops
  • Get and join leagues
  • Retrieve notifications
  • Get poop posts, comments, and likes
  • Create, update, and delete poops
  • Like and unlike poops
  • Create, update, delete, join, and leave leagues
  • Get joinable leagues and join by code
  • Get followers and followings
  • Create and delete followings
  • Create device
  • Create and update user
  • Get all users, get user by id
  • Get user stats and badges
  • Get world poops

Installation

You can install PoopMap API from PyPI:

pip install poopmap-api

Usage

from poopmap_api import PoopmapAPI

# Login
api = PoopmapAPI.login_with_password('your_username', 'your_password')

# Get your feed
feed = api.get_feed()
print(feed)

# Get leagues
leagues = api.get_leagues()

# Join a league
api.post_join_league(league_id=123)

# Get a poop post
poop = api.get_poop_post(poop_id=456)

# Get comments and likes
comments = api.get_poop_comments(poop_id=456)
likes = api.get_poop_likes(poop_id=456)

API Reference

Authentication

  • PoopmapAPI.login_with_password(username, password)
  • PoopmapAPI(authentication_token)

Feed & Leagues

  • get_feed()
  • get_leagues()
  • get_leagues_joinable()
  • post_join_league(league_id)
  • post_join_league_by_code(join_code)
  • post_join_league_json(league_id)
  • delete_leave_league(league_id)
  • post_create_league(name, is_public, join_code)
  • put_update_league(league_id, is_public)
  • delete_league(league_id)

Notifications

  • get_notifications()

Poop Posts

  • get_poops()
  • get_me_poops()
  • get_poop_post(poop_id)
  • post_create_poop(latitude, longitude, note, place, rating)
  • put_update_poop(poop_id, note, rating, place)
  • delete_poop(poop_id)
  • post_like_poop(poop_id)
  • post_unlike_poop(poop_id)

Comments

  • post_create_comment(poop_id, comment)
  • get_poop_comments(poop_id)
  • delete_comment(poop_id, comment_id)

Followers & Followings

  • get_followers(user_id)
  • get_followings(user_id)
  • post_create_following(user_id)
  • delete_following(user_id)

Devices

  • post_create_device()

Users

  • post_create_user(username, email, password, password_confirmation)
  • put_update_user(user_id, **kwargs)
  • get_users()
  • get_user(user_id)
  • get_user_stats(user_id)
  • get_user_badges(user_id)

World

  • get_world_poops()

Contributing

Contributions, bug reports, and suggestions are welcome! Please open an issue or submit a pull request.

https://api.poopmap.net/api/v1/docs can be a helpful reference source for endpoints and API details. However, note that this documentation is not of very high quality.

License

This project is released under the MIT License.

Disclaimer

This project is not affiliated with or endorsed by Poop Map or its creators. Use at your own risk. Respect Poop Map's terms of service and privacy policy.

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

poopmap_api-0.0.2.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

poopmap_api-0.0.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file poopmap_api-0.0.2.tar.gz.

File metadata

  • Download URL: poopmap_api-0.0.2.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for poopmap_api-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2c87aed72f614ad593428a15b5c2303b4f73cae8289c651198e90b41da2ecd2f
MD5 f55cae34b5e519a9a373f026d7822627
BLAKE2b-256 41d3a499b9c01983246dedcb200acb87c44c30a3c122d5b04b606e662f20fa0a

See more details on using hashes here.

File details

Details for the file poopmap_api-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: poopmap_api-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for poopmap_api-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6cc5fce1e1618d400077d45179b058a5f323ea600c9f533496097375f3eaf7b5
MD5 00367dc606ec0af9f0e362dee1a4188f
BLAKE2b-256 1a4313928561a81bd2e4f14b9800f8cabff685a92d42d6334691960bbe044a9b

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