Code Monkey home page Code Monkey logo

jsraw's Introduction

JSRAW: JavaScript Reddit API Wrapper

Super simple reddit API wrapper written in JavaScript. Primarily made to be used in the rdiscbot project.

Pausing Development

I want to focus on a few other projects, so I'm pausing development of jsraw. Although I will be more than happy to accept contributions.

Constraints

Where To Get Started

Example API wrappers

Further Readings

Quick Todo

  • Search
    • "how to document code"
    • "project planning in GitHub or project planning software"

Notes

This will be treated as a sort of journal for now. I don't know how to build an API wrapper but I think I might have an idea on how they work. Also, I should probably just use a pre-existing tool instead of re-inventing the wheel.

jsraw's People

Contributors

laughingclouds avatar

Watchers

 avatar

Forkers

vivelacode

jsraw's Issues

API endpoints proper naming

The endpoints saved in /lib/endpoints.js are not in the same format as here.
Most of them do not start with "/".

Rather than changing the base url which would be easier, I would prefer fixing the endpoints (purely aesthetic reasons).
I will consider this as a "bug" because I just spent half an hour searching where I went wrong with the fetch requests.

reply and vote on comments

Add a method to work with comments in a reddit post
Features to add

  • Reply to a comment (given the comment link/id)
    • Which requires creating a comment object from simply link/id
  • Vote on a comment

Just these two will do for now

oauth file location

The way the code is written, the json file with the oauth information should be kept inside jsraw.
That means, once this project is installed users will have to put the oauth information within node_modules. Which does not sound very good.

Another problem is that many parts of the code directly import the oauth info json file.

Hence we need to achieve two things:

  • Allow the project to access the information file from wherever it exists.
  • Create a single interface to access the information

Work on subreddit data structure

Possible methods

  • getSubreddit: Return Subreddit type object (if subreddit exists)
  • submit: Submit a post to this subreddit
  • getRedditPost: Get a post within this subreddit (postID36Link is provided)
  • etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.