Daniel Ponte
6650ce4b01
remove examples
2022-03-12 12:35:38 -05:00
Daniel Ponte
edbf3599a6
Support being given an oauth2 TokenSource
2022-03-12 12:34:44 -05:00
Daniel Ponte
3e50b43650
Merge branch 'master' of https://github.com/and3rson/go-reddit
2022-03-12 10:04:11 -05:00
Daniel Ponte
114f97a53c
name
2022-03-12 01:53:21 -05:00
Andrew Dunai
83240db9f6
Add support for Application Only OAuth (aka "two-legged oauth")
...
Signed-off-by: Andrew Dunai <a@dun.ai>
2021-07-30 23:33:58 +03:00
Vartan Benohanian
2f1019d170
Update logo
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-02-04 19:26:35 -05:00
Vartan Benohanian
9ee35cb5a6
Update readme
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-02-01 12:09:45 -05:00
Vartan Benohanian
3854472976
Update readme
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-02-01 12:06:12 -05:00
Vartan Benohanian
ff5b4e8f91
Update readme
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-01-31 21:30:21 -05:00
Vartan Benohanian
d760e5baeb
Update readme
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-01-31 21:28:24 -05:00
Vartan Benohanian
749546cbb3
Update readme and changelog
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-01-31 21:25:37 -05:00
Vartan Benohanian
e60ea7244d
Bump version to v2
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-01-31 20:36:04 -05:00
Vartan Benohanian
fc7bed41e0
Update module path in go.mod
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-01-31 20:10:48 -05:00
Vartan Benohanian
e223ee1d24
Edit change log, move it to root directory of repo
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-01-24 23:03:51 -05:00
Vartan Benohanian
ea623a6577
Edit readme, add change log
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-01-24 22:59:36 -05:00
Vartan Benohanian
6d615771cb
Use Credentials struct for NewClient
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2021-01-24 22:55:37 -05:00
Vartan Benohanian
78dc97a8d5
Make DefaultClient a method that returns the global default client
...
I made this a method to prevent other users from reassigning the
previously exported DefaultClient, e.g. doing something like:
```go
reddit.DefaultClient = nil
```
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-11-01 22:25:13 -05:00
Vartan Benohanian
8fe2410f4a
Use t.Cleanup instead of defer to close server
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-11-01 22:15:20 -05:00
Vartan Benohanian
f649927150
Update readme
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-29 14:52:10 -04:00
Vartan Benohanian
d128a7c4f7
Remove "before" field from Response
...
Listing responses only ever contain a non-empty "before" field when the
"count" parameter is provided, which is only useful for the HTML
website, not really needed for API clients
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-29 14:19:32 -04:00
Vartan Benohanian
15ee94fbbe
Replace fmt.Sprint with strconv.Itoa, specify slice capacity
...
Uber's Go style guide outlines a slight performance benefit when using
strconv over fmt:
dc025303c1/style.md (prefer-strconv-over-fmt)
Also specifiying slice capacity when it is known beforehand:
dc025303c1/style.md (specifying-slice-capacity)
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-29 14:01:21 -04:00
Vartan Benohanian
022cfd5cb1
Edit error messages
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-29 13:40:34 -04:00
Vartan Benohanian
6f79da6e35
Rate limit errors, prevent requests if above limit
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-28 23:44:24 -04:00
Vartan Benohanian
28b59f02c7
WIP: Create widgets
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-27 23:11:40 -04:00
Vartan Benohanian
0f7f76e7d9
Create more widget types
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-25 10:38:58 -04:00
Vartan Benohanian
6bdece7370
Create WidgetService
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-24 09:40:32 -04:00
Vartan Benohanian
1b8b239f52
Add tests, get post requirements for subreddit
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-22 09:00:00 -04:00
Vartan Benohanian
e14a54f64e
Create and edit a subreddit, get its settings
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-21 23:45:06 -04:00
Vartan Benohanian
a76dfa0a00
Use (*http.Request).PostForm, delete preceding slashes
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-20 23:51:06 -04:00
Vartan Benohanian
e01896137a
Create getThing method to remove duplicate code
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-18 11:27:42 -04:00
Vartan Benohanian
1eb75d163c
Add embedded urls attribute to live thread updates
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-18 09:56:06 -04:00
Vartan Benohanian
e73b89f0b8
Finish LiveThreadService
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-18 01:20:18 -04:00
Vartan Benohanian
58278ffe5d
Add more methods to LiveThreadService
...
- Close the live thread
- Configure a live thread's settings
- Invite a user
- Uninvite a user
- Set a contributors permissions
- Revoke a user's contributorship
- Report a live thread
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-17 23:46:41 -04:00
Vartan Benohanian
f814c51b53
Add more methods to LiveThreadService
...
- Create a live thread
- Get a live thread's contributors
- Accept an invite to contribute to a live thread
- Leave a live thread
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-16 23:09:17 -04:00
Vartan Benohanian
359f8126a1
Create LiveThreadService
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-15 22:26:27 -04:00
Vartan Benohanian
77d0d257d3
Add methods to upload images to a subreddit
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-14 13:30:18 -04:00
Vartan Benohanian
5343dfc40d
Merge pull request #3 from thealamu/master
...
Link to documentation
2020-09-14 12:48:11 -04:00
Faithfulness Alamu
13ad5c4ccb
Update README
...
Add link to documentation
2020-09-14 11:43:26 +01:00
Vartan Benohanian
f1b0d39a66
Remove duplicate code
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-13 22:20:00 -04:00
Vartan Benohanian
7bb73ddc6e
Add stylesheet methods and more to subreddit service
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-13 21:43:59 -04:00
Vartan Benohanian
9c85166c66
Get/create subreddit rules, get subreddit traffic
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-13 18:43:03 -04:00
Vartan Benohanian
8a9e41181d
Implement api/flaircsv
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-12 17:09:26 -04:00
Vartan Benohanian
c37b934c01
Select/assign flairs
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-10 23:41:17 -04:00
Vartan Benohanian
519a448ff9
Get flair choices
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-10 00:41:24 -04:00
Vartan Benohanian
def7e3bdb7
Chage NewRequest methods, add multi description kind to thing
...
Since Reddit's API accepts form data as the body for most of its
endpoints, it made sense to me to make the default NewRequest method
set the request body as form data (if provided of course). The
NewJSONRequest method can accept a JSON body.
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-09 23:02:06 -04:00
Vartan Benohanian
34c2559707
Create, update, and reorder flair templates
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-08 22:36:12 -04:00
Vartan Benohanian
d72022d252
Delete flairs and flair templates
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-08 20:37:16 -04:00
Vartan Benohanian
ea2b3f138e
Add methods to flair service, fix comment typo
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-08 20:36:28 -04:00
Vartan Benohanian
8458fb4c98
Add distinguishing methods
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-07 22:26:52 -04:00
Vartan Benohanian
078b172e81
Add methods to ModerationService, attribute to Post, use go v1.15
...
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-09-07 21:24:14 -04:00