GithubHelp home page GithubHelp logo

adn's Introduction

NOTE: This project is not under active development.

ADN

Build Status

A Ruby library for App.net by @kishyr.

This library follows the current App.net API Spec (as at 26 August 2012).

Contributors

ADN is brought to you by these very handsome gentlemen:

Installation

Simply add ADN to your Gemfile:

gem "adn"

Or you can install ADN directly from rubygems.org:

gem install adn

Usage

For API calls that accept parameters described in the App.net API Spec, simply pass them as a dictionary to the method.

  require 'adn'

  ADN.token = "your App.net OAuth-token here."

  # TODO: Actually describe the usage of the library
  #       (Should be refactored first)

Complete documentation will be available soon, but in the meantime you can browse all API methods in lib/adnruby.rb.

License

ADN is licensed under the MIT License and is Copyright (c) 2013 Kishyr Ramdial.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

adn's People

Contributors

buddhamagnet avatar leifg avatar mthurman avatar peterhellberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

adn's Issues

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.

Refactor API URLs

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

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.

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?

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.