diff --git a/PocketSharp/authentication-screen.png b/PocketSharp/authentication-screen.png new file mode 100644 index 0000000..49e3717 Binary files /dev/null and b/PocketSharp/authentication-screen.png differ diff --git a/README.md b/README.md index a042f29..b3536ed 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,9 @@ # PocketSharp -> This project is work in progress. Be aware of this! +> This project is work in progress. +> PocketSharp will be released as a NuGet package when ready. -PocketSharp is a C#.NET class library, that integrates the [Pocket API v3](http://getpocket.com/developer). - -_If you don't know [Pocket](http://getpocket.com), be sure to check it out. It's an awesome service, which lets you save articles, videos, ... in the cloud and access it from all your devices._ - -PocketSharp consists of 4 parts: +PocketSharp is a C#.NET class library, that integrates the [Pocket API v3](http://getpocket.com/developer) and consists of 4 parts: - Authentication - Retrieve @@ -15,6 +12,10 @@ PocketSharp consists of 4 parts: --- +_If you don't know [Pocket](http://getpocket.com), be sure to check it out. It's an awesome service, which lets you save articles, videos, ... in the cloud and access it from all your devices._ + +--- + ## Usage Example Request a [Consumer Key on Pocket.](http://getpocket.com/developer/apps/) @@ -86,13 +87,15 @@ _client.AccessCode = "[YOU_ACCESS_CODE]"; In order to communicate with a Pocket User, you will need a consumer key (which is generated by [creating a new application on Pocket](http://getpocket.com/developer/apps/)) and an **Access Code**. -This is a 3-step process: +The authentication is a 3-step process: 1) Receive the **request code** and **authentication URI** from the library by calling `string GetRequestCode()`: ```csharp string requestCode = _client.GetRequestCode(); +// 0f453f2d-1605-8584-28fd-39af8e Uri authenticationUri = _client.GenerateAuthenticationUri(); +// https://getpocket.com/auth/authorize?request_token=0f453f2d-1605-8584-28fd-39af8e&redirect_uri=http%253a%252f%252fceecore.com ``` The _request code_ is stored internally, but you can also provide it as param in `GenerateAuthenticationUri(string requestCode = null)`. @@ -103,6 +106,7 @@ The _request code_ is stored internally, but you can also provide it as param in ```csharp string accessCode = _client.GetAccessCode(); +// fa8bfc16-69b3-4d22-7db7-84a58d ``` Again, the received _access code_ is stored internally.