Freedom in the key of C#, or a C# implementation of the App.net API.
Response Envelope Refactor - Version 0.9 (not released on NuGet)
- Exposed ResponseEnvelope from all service endpoints
- Minor bug fixes
- Waiting for core annotation support and user general parameters support before Nuget release
Stars and Reposts - Version 0.8 (not released on NuGet)
- Added full starring API
- Added full reposting API
- Updated post general parameters
- Minor bug fixes
- Waiting for core annotation support and general parameters answers before Nuget release
ApiCaller Refactor - Version 0.7 (not released on NuGet)
- Refactored out the RestSharp ApiCaller
- Moved the ResponseEnvelope and Metadata classes into the Domain.Response folder
Machine Only - Version 0.6
- Added Machine only posts and post filter
ANNOTATIONS! - Version 0.5
- Added fully dynamic Post Annotations
- NOTICE: Added dependency on Json.Net (unavoidable without lots of extra work)
- Added ResponseEnvelope to RestSharpApiCaller
- Fixed minor Domain issues
HUGE UPDATE - Version 0.4
- Added full UsersSpec
- Added full PostsSpec
- Added integration tests for Posts and Users
- Fixed minor Domain issues
Version 0.3
- Added TokenSpec
- Added RestSharpApiCallerSpec
- Added Rapptor.Api
- Fixed Domain issues
Version 0.2.1 (not released on NuGet)
- Added configurable Scopes to Authorization Spec
Version 0.2
- Added Authorization Spec (this is HUGE!)
Version 0.1
- Initial Release
- Added a basic implementation of all key App.net objects.
- Authenticate first to ensure you have an
access_token
- Get Rapptor.Api from NuGet
- Initialize an instance of the appropriate API service while passing it an
IApiCaller
(e.g.TokenService(new RestSharpApiCaller(access_token))
) - Call the appropriate API method (e.g.
tokenService.RetriveCurrentTokenInfo();
)
- Create a new
Annotation
- Set it's
Type
equal to the reversed url of your choice - Set it's
Value
property to whatever class/value you want (Annotations
are limited to 8k) - Add your new
Annotation
to aList<Annotation>
- Create a new
CreatePostRequest
and set it'sAnnotations
property to yourList<Annotation
- Call
postService.CreatePost
with yourCreatePostRequest
- Call
postService.Get(postId)
to retrieve your post with its new annotation.
NOTE: Some Types are reserved, see the API for more information: https://github.com/appdotnet/api-spec/blob/master/annotations.md
Annotations Example
var annotationValue = new MyAnnotationClass
{
Name = "My test parameter annotation"
, Value = 23.5M
};
var annotation = new Annotation
{
Type = "net.raptorapp.test.request.parameter"
, Value = annotationValue
};
var createPostRequest = new CreatePostRequest
{
Text = @"@jdscolam this is another #Rapptor #testpost, with links and stuff. https://github.com/jdscolam/Rapptor and Rapptor NuGet"
, ReplyTo = "197934"
, Annotations = new List<Annotation> { annotation }
};
var myNewPost = postService.CreatePost(createPostRequest);
- Get Rapptor.Authorization from NuGet
- Initialize an instance of the
AuthorizationService
passing in the appropriate parameters - Subscribe to the AccessResponseReceived event (or provide a callback to the
RetrieveAccessToken(...)
call) - Call
authorizationService.ConnectToClearingHouse();
- Call
authorizationService.RetriveAccessToken();
- Enjoy!
NOTE: Authentication will open a browser window in another process so the user can authorize the application on App.net!
Example from AuthorizationSpec.cs
var scopes = new List<Scope>
{
Scope.Stream
, Scope.Email
, Scope.WritePost
, Scope.Follow
, Scope.Messages
, Scope.Export
};
var authorizationService = new AuthorizationService(CLEARING_HOUSE_ADDRESS, CLIENT_ID, CLIENT_SECRET, scopes);
authorizationService.AccessResponseReceived += accessResponse =>
{
myAccessToken = accessResponse.AccessToken;
};
authorizationService.ConnectToClearingHouse();
authorizationService.RetriveAccessToken();
- Get Rapptor.Domain from NuGet
- Add
using Rapptor.Domain;
to your class - Use the included classes when interfacing with the App.net API
- User
- Description
- Counts
- IEntity (Mentions, Hashtags, Links)
- Post
- Source
- Filter
- Ideas on implementing core annotations without required Json.Net type information.
- Any suggestions on how to avoid showing a browser for authentication.
- Any thoughts on cleaning up current code as it stands.
- Ideas on Filters, Streams, and Subscriptions implementation.
- More API calls as they are delivered by App.net team
- Async authorization calls
- Example app
- Further RapptorMods as well
SignalR Clearing House Hub curtousey of Frank Wanicka, @fwanicka JsonDotNetSerializer inital version Copyright 2010 John Sheehan
We shall be slaves no longer!