Commit Graph

11 Commits

Author SHA1 Message Date
Vartan Benohanian
977a222d66 Change readFileContents method signature
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-07-21 21:56:32 -04:00
Vartan Benohanian
5c376a1af4 Get more replies to a comment via /api/morechildren
Also started using slices of pointers instead of slices of structs. This
is useful especially in the case of adding to the list of replies of a
comment. If the comment is a plain old struct (non-pointer), the change
wouldn't happen

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-07-20 18:56:38 -04:00
Vartan Benohanian
c85bb5485f WIP: Create More struct, to be used to load more comments
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-07-17 17:04:28 -04:00
Vartan Benohanian
ec7e8abe8e Create PostAndCommentService, holds common methods
Some functionality such as saving, voting, deleting, etc. is common to
both posts and comments, so this service will hold such methods.

Tweaked the separate post/comment services accordingly. Fixed tests.

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-07-13 23:05:24 -04:00
Vartan Benohanian
4094044593 Rename package to go-reddit
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-07-11 13:49:07 -04:00
Vartan Benohanian
33294aa036 Reuse common service struct
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-06-28 00:05:55 -04:00
Vartan Benohanian
c8d7abf216 Fix tests, add trophies endpoint for account, edit trophies struct
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-06-27 23:15:27 -04:00
Vartan Benohanian
f649216b9d Replace references to "link" by "post"
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-06-22 21:52:34 -04:00
Vartan Benohanian
3169b4be19 Use assert package for tests, much cleaner
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-05-29 19:50:52 -04:00
Vartan Benohanian
7922711d51 Handle listings better by using custom unmarshaling
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-05-03 17:35:06 -04:00
Vartan Benohanian
9a171b1c90 Add good bit of functionality, some tests
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
2020-04-29 15:59:18 -04:00