Skip to content

Commit

Permalink
Added Install and Usage to Readme
Browse files Browse the repository at this point in the history
Also cleaned up some files that should not have existed
  • Loading branch information
deno8bits committed Nov 27, 2023
1 parent 9bdf446 commit 359c87c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,3 @@ $RECYCLE.BIN/
# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,python

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)

1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
I don't really know what to put in here

1. Make sure flake8 does not yell at you

# Documenting
Just follow the [Google Docstring Format](https://google.github.io/styleguide/pyguide.html)
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,47 @@ Python wrapper I use for personal projects. Use at your own risk.

Inspired by [PRAW](https://github.com/praw-dev/praw)

# Install

```
pip install git+https://github.com/deno8bits/japwr
```


# Usage

## Get daily top posts from r/all

```py
from japwr import Reddit

reddit = Reddit('SOME USERAGENT HERE')

posts = reddit.subreddit('all').top()
```

## Get a post

```py
from japwr import Reddit

reddit = Reddit('SOME USERAGENT HERE')

post = reddit.post('144f6xm')
```

## Get multiple posts

```py
from japwr import Reddit

reddit = Reddit('SOME USERAGENT HERE')

post = reddit.batchPosts(['144f6xm', '14nb5qs'])
```



# TODO
- [ ] Ability to read anything there is an endpoint for (if the user is allowed to)
- [ ] Ability to do basic stuff like creating posts and comments (if the user is allowed to)
Expand Down

0 comments on commit 359c87c

Please sign in to comment.