Giter Club home page Giter Club logo

pace's Introduction

Welcome to Pace for Developers.

If you're new here, we recommend you take a few minutes to understand how Pace for Developers works:

On this page

Pace CLI

The Pace command line interface provides programatic access to Pace.

pace help
pace list
pace templates
pace <service>.<method> -Flags=value

See the help:

$ pace help

Check the version:

$ pace version

Go client library

To use the Go client:

go get github.com/pacedotdev/pace

Then import it into your code:

  • Use pace.New(apikey) to create a pace.Client with your API key (Read more about API keys in Pace)
  • Call the function to create the service you need (e.g. pace.NewCardsService) passing in the pace.Client
  • Call the methods on that service to access the Pace API

Here is a complete example:

package main

import (
	"context"
	
	"github.com/pacedotdev/pace"
)

func run(ctx context.Context) error {
	apikey := os.Getenv("PACE_API_KEY")
	secret := os.Getenv("PACE_API_SECRET")
	client := pace.New(apikey, secret)
	cardsService := pace.NewCardsService(client)
	
	resp, err := cardsService.GetCard(ctx, pace.CreateCardRequest{
		OrgID:  "your-org-id",
		CardID: "12",
	})
	if err != nil {
		return err
	}

	fmt.Println("Card 12:", resp.Card.Title)
}

func main() {
	ctx := context.Background()
	if err := run(ctx); err != nil {
		fmt.Fprintf(os.Stderr, "err: %s\n", err)
	}
}

Pace JSON/HTTP API

You can make plain old HTTP calls with JSON payloads to interact with Pace.

  • Make calls directly to https://pace.dev/api
  • Set the Content-Type header to application/json
  • Use POST method
  • Set X-API-KEY and X-API-SIGNATURE headers (Read more about API keys in Pace)
POST https://pace.dev/api/CardsService.GetCard
Content-Type: application/json
X-API-KEY: your-api-key

{
	"OrgID": "your-org-id",
	"CardID": "12",
}

The response varies depending on which method you're calling, but there is always an Error string field which is empty (along with a 200 status code) if the operation was successful.

pace's People

Contributors

dahernan avatar matryer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

anarcher

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.