Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Implementing Wiki #87

Closed
wants to merge 24 commits into from
Closed

Implementing Wiki #87

wants to merge 24 commits into from

Conversation

jamesrswift
Copy link
Contributor

@jamesrswift jamesrswift commented Jan 4, 2023

I've started implementing a controller for wiki objects. This PR is still very much a draft and work in progress, having still several things that will need doing before it is ready (some of which I will admit not to having enough knowledge of the codebase to do myself). I'll list these below:

  • wiki.getDiscussions(). This returns a list of discussions about a given wiki page, and takes subreddit and page as arguments. This is in the form of a listing, which is arguably the most obtuse part of the Reddit API, and one I won't be able to do myself.
  • Similarly, wiki.getRevisions(). This returns a list of recently changed wiki pages in the given subreddit.
  • Once more, wiki.getPageRevisions(). As above, returns a list of recent changes but for a given page on a subreddit.
  • wiki.getPage(). This returns the contents of a wiki page, but can take revision IDs to yield a diff if so desired. I imagine that this function should be implemented as internal, and expose two separate functions for the two different uses.
  • I haven't started yet on any of the return typings, as the API documentation helpfully doesn't provide this. This will come in a later commit.
  • No work has been done on implementing a wiki object class. This will require some design decisions on how to handle revisions, and pages, either separately or together.
  • wiki.getSettings and wiki.changeSettings do not have the settings interface defined yet, I want to experiment whether the endpoint for changing settings accepts partial settings or if it needs all of them.

All the best :)

@jamesrswift
Copy link
Contributor Author

jamesrswift commented Jan 5, 2023

Everything is just about completed, except wiki.getDiscussions( subreddit, page ). I don't seem able to use the endpoint without it returning an empty listing, so I'm not sure what type of data it even responds with. I have a hunch it responds with items of type Submission, but no idea for sure.

@jamesrswift jamesrswift marked this pull request as ready for review January 5, 2023 20:38
@jamesrswift
Copy link
Contributor Author

jamesrswift commented Jan 6, 2023

Merged in changes related to #88 (see #91). Only thing left to implement is wiki.getDiscussions( subreddit, page ). I'm happy for this to be reviewed now though, and hopefully pulled.

@jamesrswift jamesrswift changed the title (Draft) Implementing Wiki Implementing Wiki Jan 6, 2023
@jamesrswift jamesrswift closed this Jan 8, 2023
@jamesrswift jamesrswift deleted the wiki_pull_request branch January 8, 2023 16:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant