Skip to content

variety-jones/polygon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

polygon provides a simple interface to interact with Polygon via its API. This library contains all the custom objects mentioned in the API Documentation (along with convenient functions to pretty print them). It provides functions with just one input parameter for each API end point, while doing the rest of the steps internally, (such as creating the URL according to API specifications, unmarshalling into custom objects, error handling, etc)

For example, once you've created an API object, calling an endpoint is as easy as api.ProblemsList(parameters), where parameters is a map containing all your required parameters.

Installation

Just running

go get github.com/variety-jones/polygon

should add this package to your GOPATH.

Usage

To use it to create custom applications, you just need to import it via

import github.com/variety-jones/polygon

After that, each API can be accessed via the polygon.PolygonApi object.

Note that due to Go language specifications, all functions/structs/exposed-fields from the polygon library would start with a capital letter. Also, you have to skip the dots in the name and capitalize the letter following the dot.

For example,

problem.saveStatement can be called via api.ProblemSaveStatement

Examples

To get a better understanding of how to use this package, please go through this example

Documentation

For a detailed documentation of each function's description, parameters and return types, along with the exposed fields of the custom objects, visit this Package documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages