Skip to content

Commit

Permalink
updated readme and some comments updated as well
Browse files Browse the repository at this point in the history
  • Loading branch information
a-legotin committed Jan 18, 2017
1 parent f39804c commit 675997b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions InstaSharper/Classes/IResult.cs
Original file line number Diff line number Diff line change
@@ -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; }
Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

[![Build status](https://ci.appveyor.com/api/projects/status/6os0fhi1awbplbka?svg=true)](https://ci.appveyor.com/project/a-legotin/instasharper)
[![Build Status](https://travis-ci.org/a-legotin/InstaSharper.svg?branch=master)](https://travis-ci.org/a-legotin/InstaSharper)
[![Telegram chat](https://img.shields.io/badge/telegram-channel-blue.svg)](https://t.me/instasharper)
[![GitHub stars](https://img.shields.io/github/stars/a-legotin/InstaSharper.svg)](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. *

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 675997b

Please sign in to comment.