Skip to content
This repository was archived by the owner on Jan 16, 2023. It is now read-only.

codex-team/capella.go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Capella SDK for Golang

package contains methods to upload images to the Capella Server

Installation

Go Get

go get https://github.com/codex-team/capella.go

Usage

import(
	"github.com/codex-team/capella.go"
)

func main() {

    // upload image from URL
    url := "imageUrl"
    response, err := capella.Upload(url)
    
    if err != nil {
       // handle or panic
    }
    
    ....
    
    // upload image from local path
    filepath := "~/images/file.png"
    response, err := capella.UploadFile(filepath)
    
    if err != nil {
       // handle or panic
    }
}

response implements capella.Response struct that has success, message, id, url

success is true when CodeX capella saved the image

url - special allocated URL for uploaded image. If success is false this propery takes value of nil

message - in case of error you will get a message.

Docs

CodeX Capella documentation

Contribution

Feel free to aks a question, report a bug or fork and improve a package

About

Capella SDK for Golang

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages