Giter Site home page Giter Site logo

podio-go's Introduction

Podio-go

Unofficial, semi-internally maintained Go client for Podio.

The only goal for this is to track https://github.com/kayteh/terraform-provider-oidop. This will never have perfect feature parity unless it's picked up by the Podio team for real.

Usage

Using this SDK in your Go project

Import:

import(
 "github.com/kayteh/podio-go"
)

Initialize the client:

var client *podio.Client
client = podio.NewClient(podio.ClientOptions{
		ApiKey:    "...",
		ApiSecret: "...",
		UserAgent: "...(anything can go in here)",
	})

Client is now ready to use, example:

 var appId := "1234"
 var app := client.GetApplication(appId) //get the details of a Podio App
 ...

For developers: testing the SDK via the CLI (see ./cmd/podio-cli)

Developers can add to the CLI the calls that they want to test out. Right now, the CLI only tests the CRUD operations over Podio 'Spaces'.

Change directory to the CLI program and build it:

cd ./cmd/podio-cli
go build

Set the following environment variables (code below works in bash):

export PODIO_USERNAME=abcd
export PODIO_PASSWORD=abcd1234
export PODIO_CLIENT_ID=something
export PODIO_CLIENT_SECRET=something

Use the CLI:

Get all organizations:

podio-cli organizations

Get all workspaces within an organization:

  • <orgID> is a number
podio-cli workspaces <orgID>

Get all applications within a space:

  • <spaceID> is a number
podio-cli applications <spaceID>

Read an application:

  • <appID> is a number
podio-cli app <appID>

Create a field within an app

  • <appID> is a number, the id of the app you wish to add the field to
  • <fieldType> is the type of field you wish to create: text, date, location, phone, etc.
  • <label> is the label you wish to give the field
podio-cli create-field <appID> <fieldType> <label>

Read a field

  • <appID> is a number
  • <fieldID> is a number
podio-cli field <appID> <fieldID>

Update a field

  • <appID> is a number, the id of the app the field belongs to
  • <fieldID> is a number, the id of the field you wish to update
  • <label> is the new label you wish to give the field
podio-cli update-field <appID> <fieldID> <label>

Delete a field

  • <appID> is a number, the id of the app the field belongs to
  • <fieldID> is a number, the id of the field you wish to delete
  • <deleteValues> can be set to either true or false, or it can be omitted (defaults to false). When true, the values in the field for existing items will be deleted.
podio-cli delete-field <appID> <fieldID> <deleteValues>

Read a Space:

  • <spaceID> is a number
podio-cli space <spaceID>

Create a Space:

  • <orgID> is a number
  • <spaceName> is the name you want the space to have
podio-cli create-space <orgID> <spaceName>

Rename a Space:

  • <spaceID> is a number
  • <newName> is the new name you want the space to have
podio-cli rename-space <spaceID> <newName>

Delete a Space:

  • <spaceID> is a number
podio-cli delete-space <spaceID>

podio-go's People

Contributors

sharefile-kt avatar ctxs-aanp avatar mekanoe avatar

Watchers

 avatar

Forkers

aannirajpatel

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.