Giter VIP home page Giter VIP logo

go-site24x7's Introduction

CI codecov status-badge GitHub go.mod Go version

go-site24x7

Go client library for the Site24x7 API.
At this moment this library is a huge WIP and many site24x7 API-resources are still missing.

Usage

Prerequisites

In order to do API-requests to site24x7, the following is required:

  • Client ID
  • Client Secret
  • Refresh Token

Follow the steps described in https://www.site24x7.com/help/api/index.html#authentication to obtain these.

Getting a site24x7 client

Construct a Site24x7 client requires two steps. First get an authenticator:

auth, err := oauth.NewAuthenticator("my clientid", "my clientsecret", "my_refreshtoken", "https://accounts.zoho.eu")  

For the tokenDomain, make sure you use the same domain as when you registered the client application.

Next, get the client itself:

client := site24x7.NewClient(auth, "my_api_domain")  

Optionally, but recommended, you can construct a site24x7 client with a custom HTTP client:

client := site24x7.NewClient(auth, "my_api_domain", http.Client{Timeout: time.Second * 10})  

For a complete example, see the examples directory.

Invoking the API

E.g. to get a list of users:

users, err := client.Users.List()  

See the examples directory for more examples.

go-site24x7's People

Contributors

jordi-t avatar

Watchers

James Cloos avatar

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.