Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Objective-C client for the Altmetric API.
Objective-C Shell C Ruby
Branch: gh-pages
Pull request Compare This branch is even with gh-pages.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Classes
css
img
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
hierarchy.html
index.html

README.md

SZNAltmetric

Objective-C client for the Altmetric API. Build Status

This is still in early stages of development, so proceed with caution when using this in a production application. Any bug reports, feature requests, or general feedback at this point would be greatly appreciated.

SZNAltmetric is an Altmetric API client for iOS and Mac OS X. It’s built on top of AFNetworking to deal with network operations.

Getting Started

The easiest way to get started is to use CocoaPods to manage your dependencies. Follow the instructions on the CocoaPods site to install the gem, and specify SZNAltmetric as a dependency in your Podfile with pod 'SZNAltmetric', '0.2'.

If you want to install SZNAltmetric manually, you can read our “Getting Started” guide.

Example Usage

We wanted to make it as simple as possible to fetch details about an article from the API, so here is how it looks like:

// Let’s specify an API key (optional)
SZNAltmetricAPIClient *client = [SZNAltmetricAPIClient sharedClient];
client.APIKey = @"###abc123###";

// Okay, now let’s fetch some data
[client fetchArticleWithDOI:@"###DOI###"
                    success:^(SZNAltmetricArticle *article) {
                        // We have the article, 
                        // we can log the Altmetric score
                        NSLog(@"%@", [article.score stringValue]);
                    } failure:nil];

As you can see, we have just requested an article based on its DOI (you can also use Altmetric ID, PubMed ID, arXiv ID, and ADS Bibcode). What you get is a SZNAltmetricArticle object, containing all the identifiers, the Altmetric score, and even the URLs to the “donuts” images.

References

Requirements

SZNAltmetric requires Xcode 4.4 with either the iOS 5.0 or Mac OS X 10.7, as well as AFNetworking. Both SZNAltmetric and AFNetworking use ARC.

Credits

SZNAltmetric is developed by shazino.

License

SZNAltmetric is available under the MIT license. See the LICENSE file for more info.

Something went wrong with that request. Please try again.