-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# PySnooNotes | ||
|
||
Python wrapper for the Snoonotes API | ||
|
||
## Currently Supported Features: | ||
|
||
1. Fetch notes for a particular user | ||
2. Fetch Subreddit Notes - Caching implemented | ||
3. Add notes for a user | ||
|
||
## Not Supported Currently | ||
|
||
1. Removing usernotes | ||
|
||
## Usage | ||
|
||
### Imports | ||
|
||
To use in your python project, use: | ||
|
||
`from SnooNotes.core import SnooNotes` | ||
|
||
### Sample Usage | ||
|
||
Authenticate using a Reddit account that can add usernotes and a user_key for that account that can be generated from "https://snoonotes.com/#!/userkey". The generated key is sent via PM to your reddit account. | ||
|
||
`sn = SnooNotes("username", "user_key")` | ||
|
||
Returns a dictionary with usernames and their associated usernotes: | ||
|
||
`notes_for_username = sn.get_notes_for_user("username")` | ||
`notes_for_usernames12 = sn.get_notes_for_user(["username1", "username2"])` | ||
|
||
Returns notes supported in that particular subreddit: | ||
|
||
`subreddit_notes = sn.get_notes_for_subreddit("subreddit")` | ||
|
||
Add a new usernote for the user under a subreddit with a custom note and a link to the comment/post: | ||
|
||
`sn.add_note_for_user("username", "note_type_id", "subreddit", "Reason for note", "www.reddit.com/r/subreddit/123abc/.../123abc")` | ||
|
||
|
||
The above is also summarized in the `sample.py` script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters