Giter Site home page Giter Site logo

panoptes-net-client's Introduction

Panoptes .NET Client

A .NET client for accessing the Panoptes API

General

This repo contains three projects: a ConsoleApp (to test calls while developing), the PanoptesNetClient, and a separate PanoptesNetClientTests project to cover testing.

Requirements

In order to run this client, an app must have a config transform with two config files (debug and release) to account for the Config class calling the ConfigurationManager.

In this repo, the ConsoleApp contains an example of how config files should be set up to run the client (App.Debug.config and App.Release.Config).
Ex: <add key="Environment" value="Debug" xdt:Transform="Replace" xdt:Locator="Match(key)" />

Each config file should contain four keys: Environment, ApiHost, ApplicationId, and StatsHost. Note: these keys should also be contained in the main App.Config as empty strings.

NuGet?

The Panoptes .NET client is hosted on NuGet, which is a package manager for the Microsoft development platform. Should you need to publish any changes on NuGet, Microsoft has a nice guide on how to publish. There's also some more detailed information here on getting the NuGet cli set up.

If this API key is expired, you'll need to regenerate a new API key by logging into the NuGet account using the Zooniverse Microsoft credentials. Once you're in, you can regenerate a new key and use that key to push changes to NuGet.

Making a Request

GET

A GET request can be made a couple different ways, depending on the return value and need to send a query.
ApiClient client = new ApiClient();

Get a single resource:
Workflow workflow = await client.Workflows.Get("1234");

Get a list of queued subjects for a project:

NameValueCollection query = new NameValueCollection();
query.Add("workflow_id", "1234");
List<Subject> subjects = await client.Subjects.GetList("queued", query);

panoptes-net-client's People

Contributors

wgranger avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

wgranger

panoptes-net-client's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.