-
Notifications
You must be signed in to change notification settings - Fork 3
AppDotNet Overview
The AppDotNet library provides an asynchronous Objective-C wrapper for the App.net API. The library has two main components: the ADNModel
objects, which represent the various App.net resources, and the ADNClient
, which handles all communication with App.net. It also has ADNAuthenticationRequest
, which helps with the authentication process.
The ADNClient
class is responsible for communicating with App.net. For each resource, there is an extension on ADNClient
containing methods for each of the corresponding endpoints.
For most of the API methods, an access token is required. Setting the accessToken
property on an ADNClient
will use that token for all requests made via that client.
The simplest way to make use of the client is through the singleton instance [ADNClient sharedClient]
. To support multiple accounts, you can create multiple instances of ADNClient
, each with their own access token.
Each method on ADNClient
takes whatever parameters are required by that API endpoint, as well as an optional completion block. The completion block is passed three objects: the object or collection of objects which were returned from the server, an ADNMetadata
object which contains the meta
information from the response envelope, and possibly an NSError
if something went wrong. The completion block is run on the main thread by default.
Top-Level Resources | |
---|---|
ADNUser | A model object representing an App.net User. An ADNUser contains an ADNDescription for the user's biographical info, an ADNAnnotationCollection containing user annotations, and two ADNImages for the avatar and cover images. |
ADNPost | A subclass of ADNText representing a public post. It contains an ADNUser object for the user who created the post, an ADNSource object for the app used to create the post, and an ADNAnnotationCollection of post annotations. |
ADNChannel | An object representing an App.net messaging channel. It contains an ADNUser object for the channel's owner, an ADNAnnotationCollection of channel annotations, and two ADNAccessControlLists defining read and write premissions. |
ADNMessage | A subclass of ADNText representing a message in a channel. It contains an ADNUser object for the creator, an ADNSource object for the app used to create it, and an ADNAnnotationCollection. |
ADNFile | An object representing a file uploaded to App.net. It contains an ADNUser, an ADNSource, an ADNAnnotationCollection, and a collectin of ADNDerivedFiles. |
ADNStream | An object representing an App.net stream. NOTE: Stream API methods currently requires an app token, so this resource is not currently usable in a client-side app. |
ADNFilter | A filter on an App.net stream. NOTE: Stream API methods currently requires an app token, so this resource is not currently usable in a client-side app. |
ADNInteraction |
An object representing a user action on App.net. NOTE: This class is not yet implemented |
ADNStreamMarker |
A marker object storing a user's location on a stream of posts. NOTE: This class is not yet implemented |
ADNToken | An object representing the current OAuth access token. It contains an ADNUser for the current user and an ADNSource representing the current app. |
Entities | |
---|---|
ADNEntities | |
ADNMention | |
ADNHashtag | |
ADNLink |
Annotations | |
---|---|
ADNAnnotationCollection | |
ADNAnnotation | |
ADNGeolocation |
Other Model Objects | |
---|---|
ADNAccessControlList | An ACL specifying who can read and who can write Messages in an ADNChannel. |
ADNDerivedFile | A derived file, usually a resized image based on an ADNFile. |
ADNDescription | An ADNText subclass representing biographical information on an ADNUser. |
ADNImage | An object representing an avatar or cover image on an ADNUser |
ADNSource.h | An object containing info about the API consumer that was used to create an ADNPost, ADNMessage, or ADNFile. |
ADNText.h | An object containing text, html, and entities, which serves as the base for the ADNPost, ADNMessage, and ADNDescription classes. |