From 675997bc7359dadeb4175c82dedadb23ee3c875f Mon Sep 17 00:00:00 2001 From: a-legotin <mrproz@yandex.ru> Date: Wed, 18 Jan 2017 19:18:15 +0300 Subject: [PATCH] updated readme and some comments updated as well --- InstaSharper/Classes/IResult.cs | 4 ++++ README.md | 18 +++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/InstaSharper/Classes/IResult.cs b/InstaSharper/Classes/IResult.cs index 79602179..a1e51b33 100644 --- a/InstaSharper/Classes/IResult.cs +++ b/InstaSharper/Classes/IResult.cs @@ -1,5 +1,9 @@ namespace InstaSharper.Classes { + /// <summary> + /// IResult - common return type for library public methods, can contain some additional info like: Exception details, Instagram response type etc. + /// </summary> + /// <typeparam name="T">Return type</typeparam> public interface IResult<out T> { bool Succeeded { get; } diff --git a/README.md b/README.md index c05cdff6..b69974e4 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,14 @@ Tokenless, butthurtless private API for Instagram. Get account information, medi Note that: there is a simple [Instagram API](https://github.com/a-legotin/InstagramAPI-Web) based on web-version of Instagram. This repository based on Instagram API for mobile devices. [](https://ci.appveyor.com/project/a-legotin/instasharper) +[](https://travis-ci.org/a-legotin/InstaSharper) [](https://t.me/instasharper) [](https://github.com/a-legotin/InstaSharper/stargazers) #### Current version: 1.2.1 [Stable], 1.2.2 [Under development] ## Overview -This project intends to provide all the features available in the Instagram API up to v9.7.0. It is being developed in C# for .NET Framework 4.5.2 and .NET Standart 1.6 +This project intends to provide all the features available in the Instagram API up to v10.3.2. It is being developed in C# for .NET Framework 4.5.2 and .NET Standart 1.6 * Please note that this project is still in design and development phase; the libraries may suffer major changes even at the interface level, so don't rely (yet) in this software for production uses. * @@ -79,35 +80,38 @@ var api = new InstaApiBuilder() .UseLogger(new SomeLogger()) .UseHttpClient(new SomeHttpClient()) .SetUser(new UserCredentials(...You user...)) + .UseHttpClient(httpHandlerWithSomeProxy) .Build(); ``` -##### Note: every API method has Async implementation as well +##### Note: every API method has synchronous implementation as well ### Quick Examples #### Login ```c# -bool loggedIn = api.Login(); +IResult<bool> loggedIn = await api.LoginAsync(); ``` #### Get user: ```c# -InstaUser user = api.GetUser(); +IResult<InstaUser> user = await api.GetUserAsync(); ``` #### Get all user posts: ```c# -InstaMediaList media = api.GetUserMedia(); +IResult<InstaMediaList> media = await api.GetUserMediaAsync(); ``` #### Get media by its code: ```c# -InstaMedia mediaItem = api.GetMediaByCode(mediaCode); +IResult<InstaMedia> mediaItem = await api.GetMediaByCodeAsync(mediaCode); ``` #### Get user timeline feed: ```c# -InstaFeed feed = api.GetUserFeed(); +IResult<InstaFeed> feed = await api.GetUserFeedAsync(); ``` +######for more samples you can look for [Examples folder](https://github.com/a-legotin/InstaSharper/tree/master/InstaSharper.Examples) + #### [Why two separate repos with same mission?](https://github.com/a-legotin/InstagramAPI-Web/wiki/Difference-between-API-Web-and-just-API-repositories)