Skip to content

digfish/go-meocloud-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MeoCloud API Client in GO

This module is intended to provide an implementation in GO to consume the API of the Meocloud Storage for the Meo customers in Portugal.

Note

For now, since this is my first contact with the language, I do not provide a way to fetch the access token to be used to try this module. You can take a look at the sister projects in PHP, php-meocloud-cli or meocloudrepl in Python, and following the directions, generate the access token and secret, this two more the consumer token and secret which can be obtained at https://meocloud.pt/my_apps. These four should be inscribed in a .env file with the following format:

CONSUMER_KEY=
CONSUMER_SECRET=
OAUTH_TOKEN=
OAUTH_TOKEN_SECRET=

I intend to write new functions to get the credentials later.

Source example

package main

import (
	"github.com/digfish/go-meocloud-cli"
	"fmt"
)

func main() {
	info,status := meocloudcli.Account_info()
	fmt.Println(status,info)
}

What is implemented

Method API
account_info() GET Account/Info
get_metadata() GET Metadata/meocloud/
get_file() GET Files/meocloud/:name
send_file() PUT Files/meocloud/:name
delete_file() POST Fileops/Delete
create_dir() POST Fileops/CreateFolder

About

GoLang Client Implementation of MeoCloud API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages