GithubHelp home page GithubHelp logo

adn's Issues

Refactor API URLs

Have done some more refactoring to extract the API URLs into constants.

Travis tweaks

Should we only run tests when a commit is made to master? Sometimes I am mid-branch and would like someone to have a look at a certain approach and sometimes that means all tests are not passing. Thoughts?

Too much coupling and non idiomatic Ruby (WIP)

1. We should take care not to introduce any more coupling between the classes.

The API classes have a clear separation of abstractions.

I want something like this:
require 'adn'

ADN.token = '…'

# Retrieving a user
kishyr = ADN::User.find(3089)
peter = ADN::User.find_by_username('peterhellberg')

# Retrieving a post
ADN::Post.find(313203)
peter.latest_post
2. Examples on where we need to improve the code:
  • ADN.has_error? is just plain wrong in an OO design, the response object should take care of that.
  • ADN.create_collection is another example, it doesn’t always return a collection and it has a strange second argument instead of being implemented as two separate methods.
  • The methods (except the token, for now) in the ADN module should be moved into the API classes. We need to keep the top level clean from implementation details like HTTP request handling.

Plans to implement user token

By looking at the code of the gem, I don't see any code that supports authentication via user token (especially helpful when you are implementing a web app that wants to give users access to their adn account)

Are there any plans to implement this feature? otherwise I will try to wrap my head around it and would just implement it.

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.