GithubHelp home page GithubHelp logo

octodex.objc's Introduction

octodex.objc

An Objective-C wrapper for the Octodex API.

##Use Use this class like any other Objective-C class:

// import the GHOctodex class (using GH as a prefix for GitHub)
import "GHOctodex.h";

// fetch all octocats and print the returned array
NSLog(@"%@",[GHOctodex completeOctodex]);

For complete annotation, see the actual class file (GHOctodex.m) as well as the [demo implementation](GHOctodex Demo/GHOctodex Demo/AppDelegate.m).

##Class Methods Check the response example below, to see what these functions wil serve you.

###Complete Octodex [GHOctodex completeOctodex];

Returns an array containing every octocat from the Octodex.

###Random Octocat [GHOctodex randomOctocat];

Returns an array containing a random octocat from the Octodex.

###Octocat by Number [GHOctodex numberedOctocat:number];

Where number is a number between 1 and the number of the last Octocat (as of 1/14/14 this - 113), and returns that numbered Octocat from the Octodex.

The API checks if the number exists in the Octodex, so you don't have to check if it does.

##Example Response NSDictionary:

{
    author = "http://octodex.github.com/original";
    authorAvatar = "https://img.skitch.com/20110427-p3wtwcbu957cf9mm93s4sjqqci.png";
    authorURL = "http://www.idokungfoo.com";
    image = "http://octodex.github.com/images/original.png";
    name = Original;
    number = 1;
    page = "http://octodex.github.com/original";
}

###Keys

  • name - the name of the octocat
  • page - the webpage of the octocat
  • image - the raw image URL of the octocat
  • author - the creator of the octocat
  • number - the number of the octocat in the series
  • authorURL - the URL of the author (GitHub/Website)
  • authorAvatar - the avatar of the author

##To Do

  • Check for errors given by the API and handle them

##Use of Octocats Check out the GitHub Octodex frequently asked questions (http://octodex.github.com/faq), for specific use. GitHub owns all of the Octocats, this Objective-C class just uses an API that grabs all of their data.

octodex.objc's People

Stargazers

Rudd Fawcett avatar

Watchers

James Cloos avatar Rudd Fawcett avatar  avatar

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.