Go SDK
Overview
Neurelo's Go SDK allows you to quickly and easily integrate your app with Neurelo APIs. This SDK is generated from the API spec and provides a set of methods to interact with the API endpoints. The generator creates a Go client that utilizes the std package net/http
to make HTTP requests. Tested with Go v1.22.3
Prerequisites
Go binaries are installed on your system and included in your path.
Download your generated SDK from the API pages of your project & move the generated SDK file
neurelo-sdk-golang-cmt_<id>.zip
to your project root.Tools for configuring environment variables (e.g. github.com/joho/godotenv) or simply export before starting your dev server (inline).
Installation
Copy the generated sdk
neurelo-sdk-golang-cmt_<>.zip
to your projectUnzip the sdk to
project_root/pkg/neurelo_sdk
Add the dependencies to your
go.mod
file
Usage
Make sure to set
NEURELO_API_ENDPOINT
andNEURELO_API_KEY
env variables before using the client or you can set them in the client file.Create a client file, so that it can be used by other files in the project.
API Usage
Use the client in other files to make API calls.
Execute the main file to see the output
Setup Environment Variables (Optional)
Install the
godotenv
package
Create a
.env
file in the root of your project
Load the environment variables in the
main.go
file
Examples
To review an example of an application built using Neurelo's SDK, please visit: Projects built using Neurelo SDKs
These examples are built to act as a starter template for your project
You can use these examples to understand how to use the SDK in your project
Last updated