All Projects → lionheart → ASPinboard

lionheart / ASPinboard

Licence: Apache-2.0 license
A modern, fast, and flexible Objective-C library for Pinboard.in.

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to ASPinboard

pinboard.el
A pinboard.in client for Emacs.
Stars: ✭ 32 (-60%)
Mutual labels:  pinboard, bookmarking
shared-react-components-example
An example of a mono-repository of shared React components libraries!
Stars: ✭ 85 (+6.25%)
Mutual labels:  libraries
Archivesspace
The ArchivesSpace archives management tool
Stars: ✭ 230 (+187.5%)
Mutual labels:  libraries
HackTheStacks
The 3rd Annual American Museum of Natural History Hackathon produced by the BridgeUP: STEM program
Stars: ✭ 32 (-60%)
Mutual labels:  libraries
Api
Promise and RxJS APIs around Polkadot and any Substrate-based chain RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata. Full documentation & examples available
Stars: ✭ 232 (+190%)
Mutual labels:  libraries
ConflictJS
Finding and Understanding Conflicts Between JavaScript Libraries
Stars: ✭ 39 (-51.25%)
Mutual labels:  libraries
Awesome Haxe Gamedev
Resources for game development on haxe
Stars: ✭ 213 (+166.25%)
Mutual labels:  libraries
lexical cast
General literal text conversions, such as an int represented as a string, or vice versa
Stars: ✭ 23 (-71.25%)
Mutual labels:  libraries
Cheatsheets
Quick reference material for techies
Stars: ✭ 66 (-17.5%)
Mutual labels:  libraries
pinboard-firefox
A better firefox add-on for Pinboard (http://pinboard.in).
Stars: ✭ 57 (-28.75%)
Mutual labels:  pinboard
CoolProgressViews
Android library with collection of cool progress views.
Stars: ✭ 83 (+3.75%)
Mutual labels:  libraries
Sensey
⚡ [Android Library] Play with sensor events & detect gestures in a breeze.
Stars: ✭ 2,621 (+3176.25%)
Mutual labels:  libraries
CircularDialogs
Android dialog library to give user feedback about the common operations like Success, Warning and Errors.
Stars: ✭ 35 (-56.25%)
Mutual labels:  libraries
Indicnlp catalog
A collaborative catalog of resources for Indian language NLP
Stars: ✭ 230 (+187.5%)
Mutual labels:  libraries
Harbol
Harbol is a collection of data structure and miscellaneous libraries, similar in nature to C++'s Boost, STL, and GNOME's GLib
Stars: ✭ 18 (-77.5%)
Mutual labels:  libraries
Rust Web Framework Comparison
A comparison of some web frameworks and libs written in Rust
Stars: ✭ 2,852 (+3465%)
Mutual labels:  libraries
awesome-libraries
😎 Libraries that are being shown in Sourcerer profiles.
Stars: ✭ 131 (+63.75%)
Mutual labels:  libraries
Google-Apps-Script-Library-Database
This is for the Google Apps Script Library Database and a web application for searching the libraries..
Stars: ✭ 51 (-36.25%)
Mutual labels:  libraries
type index
Runtime/Compile time copyable type info.
Stars: ✭ 20 (-75%)
Mutual labels:  libraries
jdemetra-core
JDemetra+ core libraries
Stars: ✭ 28 (-65%)
Mutual labels:  libraries

ASPinboard

ASPinboard is the Objective-C library for Pinboard that powers Pushpin. It uses modern Objective-C features (such as ARC and blocks), supports iOS 8.3+, and is dead-simple to integrate. As of January 2013, ASPinboard has full support for every endpoint in the Pinboard API, except posts/recent.

Getting Started

The first thing you'll want to do is add the files in the ASPinboard directory to your application. Alternatively, you can drag and drop the Xcode project into your existing app, and create a workspace. It's really up to you.

Quickstart

ASPinboard uses the Pinboard's authentication token to access protected resources. You can retrieve a token with the authenticateWithUsername:password:success:failure method.

void (^loginFailureBlock)(NSError *);
loginFailureBlock = ^(NSError *error) {
   if (error.code == PinboardErrorInvalidCredentials) {
       // An invalid username or password was provided.
   }
   else if (error.code == PinboardErrorTimeout) {
       // The authentication request will time out if
       // it takes longer than 20 seconds to respond.
   }
};

ASPinboard *pinboard = [ASPinboard sharedInstance];
[pinboard authenticateWithUsername:PINBOARD_USERNAME
                          password:PINBOARD_PASSWORD
                           success:^(NSString *token) {
                               NSLog(@"Your Pinboard API token is: %@", token);
                           }
                           failure:loginFailureBlock];

After authenticating, ASPinboard stores the token internally for future requests.

If you want to use a token that you've previously stored or copied from your settings page, just use the setToken method on the ASPinboard shared instance before using ASPinboard to make requests to protected resources.

[pinboard setToken:token];

Retrieving Bookmarks

Now that you have a token, let's grab your bookmarks, shall we?

void (^successBlock)(NSArray *, NSDictionary *);
successBlock = ^(NSArray *bookmarks, NSDictionary *parameters) {
    NSLog(@"Here are your bookmarks:");
    for (id bookmark in bookmarks) {
        NSLog(@"url: %@", bookmark[@"href"]);
    }
};

void (^failureBlock)(NSError *);
failureBlock = ^(NSError *error) {
   if (error != nil) {
       NSLog(@"Houston, we have a problem.");
   }
};

[pinboard bookmarksWithSuccess:successBlock failure:failureBlock];

Adding a Bookmark

[pinboard addBookmarkWithURL:@"https://pinboard.in/"
                       title:@"Pinboard"
                 description:@"A cool bookmarking site"
                        tags:@"bookmarking services"
                      shared:YES
                      unread:NO
                     success:^{}
                     failure:failureBlock];

This method can also be used to update an existing bookmark. For more information, see the Pinboard documentation for posts/add.

Other Methods

Please see ASPinboard.h for the full list of supported methods.

License

ASPinboard is available for use under the Apache License, Version 2.0. See LICENSE for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].