Info
Version: | 1.0.7 |
Author(s): | A Name Not Yet Taken AB |
Last Update: | Monday, November 6, 2017 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/annytab/a-webshop-client-api |
NuGet Url: | https://www.nuget.org/packages/AnnytabWebshopClientAPI |
Install
Install-Package AnnytabWebshopClientAPI
dotnet add package AnnytabWebshopClientAPI
paket add AnnytabWebshopClientAPI
AnnytabWebshopClientAPI Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.AspNet.WebApi.Client(>= 5.2.3)
- Microsoft.Bcl.Build(>= 1.0.21)
- Microsoft.Net.Http(>= 2.2.29)
- Newtonsoft.Json(>= 10.0.3)
Tags
You can use this client API to create applications in ASP.NET that interacts with a-webshop.
A quick start guide
Create an administrator in a-webshop with a API role, there is three different roles (API Full Trust, API Medium Trust, API Minimal Trust).
The namespace for the API is Annytab.WebshopClientAPI. You need to create a ClientConnection before you call methods in the API.
All the methods is async so need to specify the await keyword before the method call.
// Create the connection
ClientConnection connection = new ClientConnection("https://localhost:44301", "TestAPI", "test");
// Get posts
List<Campaign> campaigns = await Campaign.GetAll(connection, 0, "id", "ASC");
// Dispose of the connection
connection.Dispose();.