Skip to content

Add top-level API - #2

Merged
anaisbetts merged 4 commits into
masterfrom
castle-api
Jul 23, 2013
Merged

anaisbetts merged 4 commits into
masterfrom
castle-api

Conversation

@anaisbetts

Copy link
Copy Markdown
Member

Add the top-level class that 99% of people will use to actually do stuff. Here's how it works:

public interface IGitHubApi
{
    [Get("/users/{username}")]
    Task<User> GetUser(string userName);
}

var service = RestService.For<IGitHubApi>("https://api.github.com");
var result = await service.GetUser("octocat");

anaisbetts pushed a commit that referenced this pull request Jul 23, 2013
@anaisbetts
anaisbetts merged commit d205e48 into master Jul 23, 2013
clairernovotny pushed a commit that referenced this pull request Jun 5, 2019
@lock lock Bot locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant