Skip to content

Golang SDK for communicating with Lyrid Platform

License

Notifications You must be signed in to change notification settings

LyridInc/go-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-sdk

Golang SDK for communicating with Lyrid Platform

The SDK works under a singleton that manages Lyrid token and sessions internally. To download and use in your project: go get github.com/LyridInc/go-sdk

Then import in your project:

import "github.com/LyridInc/go-sdk"

Initialization:
You can initialize the SDK by calling:

sdk.GetInstance().Initialize(key, secret)

Where key and secret is the credentials from Lyrid. You can also use the SDK without initialization by setting LYRID_ACCESS and LYRID_SECRET as your environment variables.

Usage:

sdk.GetInstance().GetUserProfile() sdk.GetInstance().GetAccountProfile()

Simulating Serverless Function

The SDK allows you to simulates serverless function on a local machines by pointing to an endpoint instead of a Lyrid Serverless Function for development.

This helps the transition from local build into serverless functions to be seamless.