Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Objective-C client for the Altmetric API.
Objective-C Shell Other
tag: 0.3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Examples
SZNAltmetric
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
SZNAltmetric.podspec

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.3'.

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.

With just a bit of user interface, here’s how it looks like on iOS and OS X:

iOS demo app

OS X demo app

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.