diff --git a/examples/address/README.md b/examples/address/README.md index 866a674..9b1b070 100755 --- a/examples/address/README.md +++ b/examples/address/README.md @@ -1,6 +1,6 @@ # Address -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Address/api](https://m3o.com/Address/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/address/api](https://m3o.com/address/api). Endpoints: diff --git a/examples/answer/README.md b/examples/answer/README.md index 9fcaa7b..c501271 100755 --- a/examples/answer/README.md +++ b/examples/answer/README.md @@ -1,6 +1,6 @@ # Answer -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Answer/api](https://m3o.com/Answer/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/answer/api](https://m3o.com/answer/api). Endpoints: diff --git a/examples/app/README.md b/examples/app/README.md index 442a7e3..06bb73a 100755 --- a/examples/app/README.md +++ b/examples/app/README.md @@ -1,36 +1,9 @@ # App -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/App/api](https://m3o.com/App/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/app/api](https://m3o.com/app/api). Endpoints: -## Regions - -Return the support regions - - -[https://m3o.com/app/api#Regions](https://m3o.com/app/api#Regions) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/app" -) - -// Return the support regions -func ListRegions() { - appService := app.NewAppService(os.Getenv("M3O_API_TOKEN")) - rsp, err := appService.Regions(&app.RegionsRequest{ - - }) - fmt.Println(rsp, err) - -} -``` ## Status Get the status of an app @@ -230,3 +203,30 @@ Repo: "github.com/asim/helloworld", } ``` +## Regions + +Return the support regions + + +[https://m3o.com/app/api#Regions](https://m3o.com/app/api#Regions) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/app" +) + +// Return the support regions +func ListRegions() { + appService := app.NewAppService(os.Getenv("M3O_API_TOKEN")) + rsp, err := appService.Regions(&app.RegionsRequest{ + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/avatar/README.md b/examples/avatar/README.md index 40fd6a2..35fd421 100755 --- a/examples/avatar/README.md +++ b/examples/avatar/README.md @@ -1,6 +1,6 @@ # Avatar -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Avatar/api](https://m3o.com/Avatar/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/avatar/api](https://m3o.com/avatar/api). Endpoints: diff --git a/examples/cache/README.md b/examples/cache/README.md index 4cdb349..5e0c6a2 100755 --- a/examples/cache/README.md +++ b/examples/cache/README.md @@ -1,38 +1,9 @@ # Cache -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Cache/api](https://m3o.com/Cache/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/cache/api](https://m3o.com/cache/api). Endpoints: -## Decrement - -Decrement a value (if it's a number). If key not found it is equivalent to set. - - -[https://m3o.com/cache/api#Decrement](https://m3o.com/cache/api#Decrement) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/cache" -) - -// Decrement a value (if it's a number). If key not found it is equivalent to set. -func DecrementAvalue() { - cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN")) - rsp, err := cacheService.Decrement(&cache.DecrementRequest{ - Key: "counter", -Value: 2, - - }) - fmt.Println(rsp, err) - -} -``` ## Set Set an item in the cache. Overwrites any existing value already set. @@ -147,3 +118,32 @@ Value: 2, } ``` +## Decrement + +Decrement a value (if it's a number). If key not found it is equivalent to set. + + +[https://m3o.com/cache/api#Decrement](https://m3o.com/cache/api#Decrement) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/cache" +) + +// Decrement a value (if it's a number). If key not found it is equivalent to set. +func DecrementAvalue() { + cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN")) + rsp, err := cacheService.Decrement(&cache.DecrementRequest{ + Key: "counter", +Value: 2, + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/carbon/README.md b/examples/carbon/README.md index 1ff94dd..56f18c7 100755 --- a/examples/carbon/README.md +++ b/examples/carbon/README.md @@ -1,6 +1,6 @@ # Carbon -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Carbon/api](https://m3o.com/Carbon/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/carbon/api](https://m3o.com/carbon/api). Endpoints: diff --git a/examples/contact/README.md b/examples/contact/README.md index e0ad1c9..531c1eb 100755 --- a/examples/contact/README.md +++ b/examples/contact/README.md @@ -1,6 +1,6 @@ # Contact -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Contact/api](https://m3o.com/Contact/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/contact/api](https://m3o.com/contact/api). Endpoints: diff --git a/examples/crypto/README.md b/examples/crypto/README.md index ce76fc8..4f0aca0 100755 --- a/examples/crypto/README.md +++ b/examples/crypto/README.md @@ -1,65 +1,9 @@ # Crypto -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Crypto/api](https://m3o.com/Crypto/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/crypto/api](https://m3o.com/crypto/api). Endpoints: -## Quote - -Get the last quote for a given crypto ticker - - -[https://m3o.com/crypto/api#Quote](https://m3o.com/crypto/api#Quote) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/crypto" -) - -// Get the last quote for a given crypto ticker -func GetAcryptocurrencyQuote() { - cryptoService := crypto.NewCryptoService(os.Getenv("M3O_API_TOKEN")) - rsp, err := cryptoService.Quote(&crypto.QuoteRequest{ - Symbol: "BTCUSD", - - }) - fmt.Println(rsp, err) - -} -``` -## History - -Returns the history for the previous close - - -[https://m3o.com/crypto/api#History](https://m3o.com/crypto/api#History) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/crypto" -) - -// Returns the history for the previous close -func GetPreviousClose() { - cryptoService := crypto.NewCryptoService(os.Getenv("M3O_API_TOKEN")) - rsp, err := cryptoService.History(&crypto.HistoryRequest{ - Symbol: "BTCUSD", - - }) - fmt.Println(rsp, err) - -} -``` ## News Get news related to a currency @@ -116,3 +60,59 @@ func GetCryptocurrencyPrice() { } ``` +## Quote + +Get the last quote for a given crypto ticker + + +[https://m3o.com/crypto/api#Quote](https://m3o.com/crypto/api#Quote) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/crypto" +) + +// Get the last quote for a given crypto ticker +func GetAcryptocurrencyQuote() { + cryptoService := crypto.NewCryptoService(os.Getenv("M3O_API_TOKEN")) + rsp, err := cryptoService.Quote(&crypto.QuoteRequest{ + Symbol: "BTCUSD", + + }) + fmt.Println(rsp, err) + +} +``` +## History + +Returns the history for the previous close + + +[https://m3o.com/crypto/api#History](https://m3o.com/crypto/api#History) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/crypto" +) + +// Returns the history for the previous close +func GetPreviousClose() { + cryptoService := crypto.NewCryptoService(os.Getenv("M3O_API_TOKEN")) + rsp, err := cryptoService.History(&crypto.HistoryRequest{ + Symbol: "BTCUSD", + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/currency/README.md b/examples/currency/README.md index 529b845..333170f 100755 --- a/examples/currency/README.md +++ b/examples/currency/README.md @@ -1,9 +1,36 @@ # Currency -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Currency/api](https://m3o.com/Currency/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/currency/api](https://m3o.com/currency/api). Endpoints: +## Codes + +Codes returns the supported currency codes for the API + + +[https://m3o.com/currency/api#Codes](https://m3o.com/currency/api#Codes) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/currency" +) + +// Codes returns the supported currency codes for the API +func GetSupportedCodes() { + currencyService := currency.NewCurrencyService(os.Getenv("M3O_API_TOKEN")) + rsp, err := currencyService.Codes(¤cy.CodesRequest{ + + }) + fmt.Println(rsp, err) + +} +``` ## Rates Rates returns the currency rates for a given code e.g USD @@ -120,30 +147,3 @@ Date: "2021-05-30", } ``` -## Codes - -Codes returns the supported currency codes for the API - - -[https://m3o.com/currency/api#Codes](https://m3o.com/currency/api#Codes) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/currency" -) - -// Codes returns the supported currency codes for the API -func GetSupportedCodes() { - currencyService := currency.NewCurrencyService(os.Getenv("M3O_API_TOKEN")) - rsp, err := currencyService.Codes(¤cy.CodesRequest{ - - }) - fmt.Println(rsp, err) - -} -``` diff --git a/examples/db/README.md b/examples/db/README.md index 5a3e3a3..3f0a6f6 100755 --- a/examples/db/README.md +++ b/examples/db/README.md @@ -1,36 +1,9 @@ # Db -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Db/api](https://m3o.com/Db/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/db/api](https://m3o.com/db/api). Endpoints: -## ListTables - -List tables in the DB - - -[https://m3o.com/db/api#ListTables](https://m3o.com/db/api#ListTables) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/db" -) - -// List tables in the DB -func ListTables() { - dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) - rsp, err := dbService.ListTables(&db.ListTablesRequest{ - - }) - fmt.Println(rsp, err) - -} -``` ## Update Update a record in the database. Include an "id" in the record to update. @@ -53,8 +26,8 @@ func UpdateArecord() { dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) rsp, err := dbService.Update(&db.UpdateRequest{ Record: map[string]interface{}{ - "id": "1", "age": 43, + "id": "1", }, Table: "example", @@ -63,12 +36,12 @@ Table: "example", } ``` -## Delete +## Read -Delete a record in the database by id. +Read data from a table. Lookup can be by ID or via querying any field in the record. -[https://m3o.com/db/api#Delete](https://m3o.com/db/api#Delete) +[https://m3o.com/db/api#Read](https://m3o.com/db/api#Read) ```go package example @@ -80,11 +53,11 @@ import( "go.m3o.com/db" ) -// Delete a record in the database by id. -func DeleteArecord() { +// Read data from a table. Lookup can be by ID or via querying any field in the record. +func ReadRecords() { dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) - rsp, err := dbService.Delete(&db.DeleteRequest{ - Id: "1", + rsp, err := dbService.Read(&db.ReadRequest{ + Query: "age == 43", Table: "example", }) @@ -92,12 +65,12 @@ Table: "example", } ``` -## DropTable +## Truncate -Drop a table in the DB +Truncate the records in a table -[https://m3o.com/db/api#DropTable](https://m3o.com/db/api#DropTable) +[https://m3o.com/db/api#Truncate](https://m3o.com/db/api#Truncate) ```go package example @@ -109,10 +82,10 @@ import( "go.m3o.com/db" ) -// Drop a table in the DB -func DropTable() { +// Truncate the records in a table +func TruncateTable() { dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) - rsp, err := dbService.DropTable(&db.DropTableRequest{ + rsp, err := dbService.Truncate(&db.TruncateRequest{ Table: "example", }) @@ -199,10 +172,10 @@ func CreateArecord() { dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) rsp, err := dbService.Create(&db.CreateRequest{ Record: map[string]interface{}{ - "id": "1", "name": "Jane", "age": 42, "isActive": true, + "id": "1", }, Table: "example", @@ -211,12 +184,12 @@ Table: "example", } ``` -## Read +## Delete -Read data from a table. Lookup can be by ID or via querying any field in the record. +Delete a record in the database by id. -[https://m3o.com/db/api#Read](https://m3o.com/db/api#Read) +[https://m3o.com/db/api#Delete](https://m3o.com/db/api#Delete) ```go package example @@ -228,11 +201,11 @@ import( "go.m3o.com/db" ) -// Read data from a table. Lookup can be by ID or via querying any field in the record. -func ReadRecords() { +// Delete a record in the database by id. +func DeleteArecord() { dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) - rsp, err := dbService.Read(&db.ReadRequest{ - Query: "age == 43", + rsp, err := dbService.Delete(&db.DeleteRequest{ + Id: "1", Table: "example", }) @@ -240,12 +213,12 @@ Table: "example", } ``` -## Truncate +## DropTable -Truncate the records in a table +Drop a table in the DB -[https://m3o.com/db/api#Truncate](https://m3o.com/db/api#Truncate) +[https://m3o.com/db/api#DropTable](https://m3o.com/db/api#DropTable) ```go package example @@ -257,10 +230,10 @@ import( "go.m3o.com/db" ) -// Truncate the records in a table -func TruncateTable() { +// Drop a table in the DB +func DropTable() { dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) - rsp, err := dbService.Truncate(&db.TruncateRequest{ + rsp, err := dbService.DropTable(&db.DropTableRequest{ Table: "example", }) @@ -268,3 +241,30 @@ func TruncateTable() { } ``` +## ListTables + +List tables in the DB + + +[https://m3o.com/db/api#ListTables](https://m3o.com/db/api#ListTables) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/db" +) + +// List tables in the DB +func ListTables() { + dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) + rsp, err := dbService.ListTables(&db.ListTablesRequest{ + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/email/README.md b/examples/email/README.md index 18d5c93..f5f8e6e 100755 --- a/examples/email/README.md +++ b/examples/email/README.md @@ -1,6 +1,6 @@ # Email -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Email/api](https://m3o.com/Email/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/email/api](https://m3o.com/email/api). Endpoints: diff --git a/examples/emoji/README.md b/examples/emoji/README.md index d2a4c7f..ea3a4ee 100755 --- a/examples/emoji/README.md +++ b/examples/emoji/README.md @@ -1,6 +1,6 @@ # Emoji -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Emoji/api](https://m3o.com/Emoji/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/emoji/api](https://m3o.com/emoji/api). Endpoints: diff --git a/examples/evchargers/README.md b/examples/evchargers/README.md index 335b9e3..176565e 100755 --- a/examples/evchargers/README.md +++ b/examples/evchargers/README.md @@ -1,9 +1,36 @@ # Evchargers -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Evchargers/api](https://m3o.com/Evchargers/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/evchargers/api](https://m3o.com/evchargers/api). Endpoints: +## ReferenceData + +Retrieve reference data as used by this API and in conjunction with the Search endpoint + + +[https://m3o.com/evchargers/api#ReferenceData](https://m3o.com/evchargers/api#ReferenceData) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/evchargers" +) + +// Retrieve reference data as used by this API and in conjunction with the Search endpoint +func GetReferenceData() { + evchargersService := evchargers.NewEvchargersService(os.Getenv("M3O_API_TOKEN")) + rsp, err := evchargersService.ReferenceData(&evchargers.ReferenceDataRequest{ + + }) + fmt.Println(rsp, err) + +} +``` ## Search Search by giving a coordinate and a max distance, or bounding box and optional filters @@ -98,30 +125,3 @@ Location: &evchargers.Coordinates{ } ``` -## ReferenceData - -Retrieve reference data as used by this API and in conjunction with the Search endpoint - - -[https://m3o.com/evchargers/api#ReferenceData](https://m3o.com/evchargers/api#ReferenceData) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/evchargers" -) - -// Retrieve reference data as used by this API and in conjunction with the Search endpoint -func GetReferenceData() { - evchargersService := evchargers.NewEvchargersService(os.Getenv("M3O_API_TOKEN")) - rsp, err := evchargersService.ReferenceData(&evchargers.ReferenceDataRequest{ - - }) - fmt.Println(rsp, err) - -} -``` diff --git a/examples/event/README.md b/examples/event/README.md index a01a4f0..a478169 100755 --- a/examples/event/README.md +++ b/examples/event/README.md @@ -1,37 +1,9 @@ # Event -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Event/api](https://m3o.com/Event/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/event/api](https://m3o.com/event/api). Endpoints: -## Read - -Read stored events - - -[https://m3o.com/event/api#Read](https://m3o.com/event/api#Read) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/event" -) - -// Read stored events -func ReadEventsOnAtopic() { - eventService := event.NewEventService(os.Getenv("M3O_API_TOKEN")) - rsp, err := eventService.Read(&event.ReadRequest{ - Topic: "user", - - }) - fmt.Println(rsp, err) - -} -``` ## Publish Publish a event to the event stream. @@ -54,9 +26,9 @@ func PublishAnEvent() { eventService := event.NewEventService(os.Getenv("M3O_API_TOKEN")) rsp, err := eventService.Publish(&event.PublishRequest{ Message: map[string]interface{}{ + "user": "john", "id": "1", "type": "signup", - "user": "john", }, Topic: "user", @@ -106,3 +78,31 @@ func ConsumeFromAtopic() { } } ``` +## Read + +Read stored events + + +[https://m3o.com/event/api#Read](https://m3o.com/event/api#Read) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/event" +) + +// Read stored events +func ReadEventsOnAtopic() { + eventService := event.NewEventService(os.Getenv("M3O_API_TOKEN")) + rsp, err := eventService.Read(&event.ReadRequest{ + Topic: "user", + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/event/publish/publishAnEvent/main.go b/examples/event/publish/publishAnEvent/main.go index 5c63360..287af64 100755 --- a/examples/event/publish/publishAnEvent/main.go +++ b/examples/event/publish/publishAnEvent/main.go @@ -12,9 +12,9 @@ func main() { eventService := event.NewEventService(os.Getenv("M3O_API_TOKEN")) rsp, err := eventService.Publish(&event.PublishRequest{ Message: map[string]interface{}{ + "id": "1", "type": "signup", "user": "john", - "id": "1", }, Topic: "user", }) diff --git a/examples/file/README.md b/examples/file/README.md index 842161c..bd236f7 100755 --- a/examples/file/README.md +++ b/examples/file/README.md @@ -1,6 +1,6 @@ # File -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/File/api](https://m3o.com/File/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/file/api](https://m3o.com/file/api). Endpoints: diff --git a/examples/forex/README.md b/examples/forex/README.md index 076f73a..a91003f 100755 --- a/examples/forex/README.md +++ b/examples/forex/README.md @@ -1,6 +1,6 @@ # Forex -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Forex/api](https://m3o.com/Forex/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/forex/api](https://m3o.com/forex/api). Endpoints: diff --git a/examples/function/README.md b/examples/function/README.md index 18f2f57..1da058f 100755 --- a/examples/function/README.md +++ b/examples/function/README.md @@ -1,96 +1,9 @@ # Function -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Function/api](https://m3o.com/Function/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/function/api](https://m3o.com/function/api). Endpoints: -## Call - -Call a function by name - - -[https://m3o.com/function/api#Call](https://m3o.com/function/api#Call) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/function" -) - -// Call a function by name -func CallAfunction() { - functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN")) - rsp, err := functionService.Call(&function.CallRequest{ - Name: "helloworld", -Request: map[string]interface{}{ - "name": "Alice", -}, - - }) - fmt.Println(rsp, err) - -} -``` -## Describe - -Get the info for a deployed function - - -[https://m3o.com/function/api#Describe](https://m3o.com/function/api#Describe) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/function" -) - -// Get the info for a deployed function -func DescribeFunctionStatus() { - functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN")) - rsp, err := functionService.Describe(&function.DescribeRequest{ - Name: "helloworld", - - }) - fmt.Println(rsp, err) - -} -``` -## Reserve - -Reserve function names and resources beyond free quota - - -[https://m3o.com/function/api#Reserve](https://m3o.com/function/api#Reserve) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/function" -) - -// Reserve function names and resources beyond free quota -func ReserveAfunction() { - functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN")) - rsp, err := functionService.Reserve(&function.ReserveRequest{ - Name: "helloworld", - - }) - fmt.Println(rsp, err) - -} -``` ## Deploy Deploy a group of functions @@ -125,12 +38,12 @@ Subfolder: "examples/go-function", } ``` -## Update +## Call -Update a function. Downloads the source, builds and redeploys +Call a function by name -[https://m3o.com/function/api#Update](https://m3o.com/function/api#Update) +[https://m3o.com/function/api#Call](https://m3o.com/function/api#Call) ```go package example @@ -142,11 +55,14 @@ import( "go.m3o.com/function" ) -// Update a function. Downloads the source, builds and redeploys -func UpdateAfunction() { +// Call a function by name +func CallAfunction() { functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN")) - rsp, err := functionService.Update(&function.UpdateRequest{ + rsp, err := functionService.Call(&function.CallRequest{ Name: "helloworld", +Request: map[string]interface{}{ + "name": "Alice", +}, }) fmt.Println(rsp, err) @@ -178,6 +94,34 @@ func ListFunctions() { }) fmt.Println(rsp, err) +} +``` +## Update + +Update a function. Downloads the source, builds and redeploys + + +[https://m3o.com/function/api#Update](https://m3o.com/function/api#Update) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/function" +) + +// Update a function. Downloads the source, builds and redeploys +func UpdateAfunction() { + functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN")) + rsp, err := functionService.Update(&function.UpdateRequest{ + Name: "helloworld", + + }) + fmt.Println(rsp, err) + } ``` ## Delete @@ -206,6 +150,34 @@ func DeleteAfunction() { }) fmt.Println(rsp, err) +} +``` +## Describe + +Get the info for a deployed function + + +[https://m3o.com/function/api#Describe](https://m3o.com/function/api#Describe) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/function" +) + +// Get the info for a deployed function +func DescribeFunctionStatus() { + functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN")) + rsp, err := functionService.Describe(&function.DescribeRequest{ + Name: "helloworld", + + }) + fmt.Println(rsp, err) + } ``` ## Regions @@ -233,6 +205,34 @@ func ListRegions() { }) fmt.Println(rsp, err) +} +``` +## Reserve + +Reserve function names and resources beyond free quota + + +[https://m3o.com/function/api#Reserve](https://m3o.com/function/api#Reserve) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/function" +) + +// Reserve function names and resources beyond free quota +func ReserveAfunction() { + functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN")) + rsp, err := functionService.Reserve(&function.ReserveRequest{ + Name: "helloworld", + + }) + fmt.Println(rsp, err) + } ``` ## Proxy diff --git a/examples/geocoding/README.md b/examples/geocoding/README.md index ad1daf9..ffc18bb 100755 --- a/examples/geocoding/README.md +++ b/examples/geocoding/README.md @@ -1,6 +1,6 @@ # Geocoding -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Geocoding/api](https://m3o.com/Geocoding/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/geocoding/api](https://m3o.com/geocoding/api). Endpoints: diff --git a/examples/gifs/README.md b/examples/gifs/README.md index e207e8b..59abad9 100755 --- a/examples/gifs/README.md +++ b/examples/gifs/README.md @@ -1,6 +1,6 @@ # Gifs -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Gifs/api](https://m3o.com/Gifs/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/gifs/api](https://m3o.com/gifs/api). Endpoints: diff --git a/examples/google/README.md b/examples/google/README.md index 3a21caf..645acd4 100755 --- a/examples/google/README.md +++ b/examples/google/README.md @@ -1,6 +1,6 @@ # Google -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Google/api](https://m3o.com/Google/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/google/api](https://m3o.com/google/api). Endpoints: diff --git a/examples/helloworld/README.md b/examples/helloworld/README.md index 8f0aa43..af24116 100755 --- a/examples/helloworld/README.md +++ b/examples/helloworld/README.md @@ -1,6 +1,6 @@ # Helloworld -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Helloworld/api](https://m3o.com/Helloworld/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/helloworld/api](https://m3o.com/helloworld/api). Endpoints: diff --git a/examples/holidays/README.md b/examples/holidays/README.md index c0b9f00..786de28 100755 --- a/examples/holidays/README.md +++ b/examples/holidays/README.md @@ -1,6 +1,6 @@ # Holidays -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Holidays/api](https://m3o.com/Holidays/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/holidays/api](https://m3o.com/holidays/api). Endpoints: diff --git a/examples/id/README.md b/examples/id/README.md index 6d0391b..eb26228 100755 --- a/examples/id/README.md +++ b/examples/id/README.md @@ -1,6 +1,6 @@ # Id -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Id/api](https://m3o.com/Id/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/id/api](https://m3o.com/id/api). Endpoints: diff --git a/examples/image/README.md b/examples/image/README.md index ae229e6..6b5b4b5 100755 --- a/examples/image/README.md +++ b/examples/image/README.md @@ -1,6 +1,6 @@ # Image -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Image/api](https://m3o.com/Image/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/image/api](https://m3o.com/image/api). Endpoints: diff --git a/examples/ip/README.md b/examples/ip/README.md index bc0377b..570fb64 100755 --- a/examples/ip/README.md +++ b/examples/ip/README.md @@ -1,6 +1,6 @@ # Ip -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Ip/api](https://m3o.com/Ip/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/ip/api](https://m3o.com/ip/api). Endpoints: diff --git a/examples/joke/README.md b/examples/joke/README.md index 54c73c0..cb64f2e 100755 --- a/examples/joke/README.md +++ b/examples/joke/README.md @@ -1,6 +1,6 @@ # Joke -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Joke/api](https://m3o.com/Joke/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/joke/api](https://m3o.com/joke/api). Endpoints: diff --git a/examples/location/README.md b/examples/location/README.md index 83046bb..78700e1 100755 --- a/examples/location/README.md +++ b/examples/location/README.md @@ -1,6 +1,6 @@ # Location -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Location/api](https://m3o.com/Location/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/location/api](https://m3o.com/location/api). Endpoints: diff --git a/examples/movie/README.md b/examples/movie/README.md index c9debec..5ab8051 100755 --- a/examples/movie/README.md +++ b/examples/movie/README.md @@ -1,6 +1,6 @@ # Movie -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Movie/api](https://m3o.com/Movie/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/movie/api](https://m3o.com/movie/api). Endpoints: diff --git a/examples/mq/README.md b/examples/mq/README.md index 8153f1c..8f18a93 100755 --- a/examples/mq/README.md +++ b/examples/mq/README.md @@ -1,6 +1,6 @@ # Mq -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Mq/api](https://m3o.com/Mq/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/mq/api](https://m3o.com/mq/api). Endpoints: @@ -26,9 +26,9 @@ func PublishAmessage() { mqService := mq.NewMqService(os.Getenv("M3O_API_TOKEN")) rsp, err := mqService.Publish(&mq.PublishRequest{ Message: map[string]interface{}{ - "type": "signup", "user": "john", "id": "1", + "type": "signup", }, Topic: "events", diff --git a/examples/mq/publish/publishAMessage/main.go b/examples/mq/publish/publishAMessage/main.go index ad993e2..e6a7451 100755 --- a/examples/mq/publish/publishAMessage/main.go +++ b/examples/mq/publish/publishAMessage/main.go @@ -12,9 +12,9 @@ func main() { mqService := mq.NewMqService(os.Getenv("M3O_API_TOKEN")) rsp, err := mqService.Publish(&mq.PublishRequest{ Message: map[string]interface{}{ - "id": "1", "type": "signup", "user": "john", + "id": "1", }, Topic: "events", }) diff --git a/examples/news/README.md b/examples/news/README.md index b1f238b..1a0c489 100755 --- a/examples/news/README.md +++ b/examples/news/README.md @@ -1,6 +1,6 @@ # News -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/News/api](https://m3o.com/News/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/news/api](https://m3o.com/news/api). Endpoints: diff --git a/examples/nft/README.md b/examples/nft/README.md index 4450c3a..d3bafa7 100755 --- a/examples/nft/README.md +++ b/examples/nft/README.md @@ -1,6 +1,6 @@ # Nft -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Nft/api](https://m3o.com/Nft/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/nft/api](https://m3o.com/nft/api). Endpoints: diff --git a/examples/notes/README.md b/examples/notes/README.md index 3d9f237..9e98ae9 100755 --- a/examples/notes/README.md +++ b/examples/notes/README.md @@ -1,6 +1,6 @@ # Notes -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Notes/api](https://m3o.com/Notes/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/notes/api](https://m3o.com/notes/api). Endpoints: diff --git a/examples/otp/README.md b/examples/otp/README.md index c643291..c585537 100755 --- a/examples/otp/README.md +++ b/examples/otp/README.md @@ -1,6 +1,6 @@ # Otp -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Otp/api](https://m3o.com/Otp/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/otp/api](https://m3o.com/otp/api). Endpoints: diff --git a/examples/postcode/README.md b/examples/postcode/README.md index 0ce5559..a497f9c 100755 --- a/examples/postcode/README.md +++ b/examples/postcode/README.md @@ -1,37 +1,9 @@ # Postcode -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Postcode/api](https://m3o.com/Postcode/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/postcode/api](https://m3o.com/postcode/api). Endpoints: -## Validate - -Validate a postcode. - - -[https://m3o.com/postcode/api#Validate](https://m3o.com/postcode/api#Validate) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/postcode" -) - -// Validate a postcode. -func ReturnArandomPostcodeAndItsInformation() { - postcodeService := postcode.NewPostcodeService(os.Getenv("M3O_API_TOKEN")) - rsp, err := postcodeService.Validate(&postcode.ValidateRequest{ - Postcode: "SW1A 2AA", - - }) - fmt.Println(rsp, err) - -} -``` ## Lookup Lookup a postcode to retrieve the related region, county, etc @@ -87,3 +59,31 @@ func ReturnArandomPostcodeAndItsInformation() { } ``` +## Validate + +Validate a postcode. + + +[https://m3o.com/postcode/api#Validate](https://m3o.com/postcode/api#Validate) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/postcode" +) + +// Validate a postcode. +func ReturnArandomPostcodeAndItsInformation() { + postcodeService := postcode.NewPostcodeService(os.Getenv("M3O_API_TOKEN")) + rsp, err := postcodeService.Validate(&postcode.ValidateRequest{ + Postcode: "SW1A 2AA", + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/prayer/README.md b/examples/prayer/README.md index 1ad2bf6..acfdcc2 100755 --- a/examples/prayer/README.md +++ b/examples/prayer/README.md @@ -1,6 +1,6 @@ # Prayer -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Prayer/api](https://m3o.com/Prayer/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/prayer/api](https://m3o.com/prayer/api). Endpoints: diff --git a/examples/qr/README.md b/examples/qr/README.md index e2f38f4..30067fd 100755 --- a/examples/qr/README.md +++ b/examples/qr/README.md @@ -1,6 +1,6 @@ # Qr -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Qr/api](https://m3o.com/Qr/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/qr/api](https://m3o.com/qr/api). Endpoints: diff --git a/examples/quran/README.md b/examples/quran/README.md index ee61912..7381cb5 100755 --- a/examples/quran/README.md +++ b/examples/quran/README.md @@ -1,9 +1,65 @@ # Quran -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Quran/api](https://m3o.com/Quran/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/quran/api](https://m3o.com/quran/api). Endpoints: +## Chapters + +List the Chapters (surahs) of the Quran + + +[https://m3o.com/quran/api#Chapters](https://m3o.com/quran/api#Chapters) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/quran" +) + +// List the Chapters (surahs) of the Quran +func ListChapters() { + quranService := quran.NewQuranService(os.Getenv("M3O_API_TOKEN")) + rsp, err := quranService.Chapters(&quran.ChaptersRequest{ + Language: "en", + + }) + fmt.Println(rsp, err) + +} +``` +## Summary + +Get a summary for a given chapter (surah) + + +[https://m3o.com/quran/api#Summary](https://m3o.com/quran/api#Summary) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/quran" +) + +// Get a summary for a given chapter (surah) +func GetChapterSummary() { + quranService := quran.NewQuranService(os.Getenv("M3O_API_TOKEN")) + rsp, err := quranService.Summary(&quran.SummaryRequest{ + Chapter: 1, + + }) + fmt.Println(rsp, err) + +} +``` ## Verses Lookup the verses (ayahs) for a chapter including @@ -64,59 +120,3 @@ func SearchTheQuran() { } ``` -## Chapters - -List the Chapters (surahs) of the Quran - - -[https://m3o.com/quran/api#Chapters](https://m3o.com/quran/api#Chapters) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/quran" -) - -// List the Chapters (surahs) of the Quran -func ListChapters() { - quranService := quran.NewQuranService(os.Getenv("M3O_API_TOKEN")) - rsp, err := quranService.Chapters(&quran.ChaptersRequest{ - Language: "en", - - }) - fmt.Println(rsp, err) - -} -``` -## Summary - -Get a summary for a given chapter (surah) - - -[https://m3o.com/quran/api#Summary](https://m3o.com/quran/api#Summary) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/quran" -) - -// Get a summary for a given chapter (surah) -func GetChapterSummary() { - quranService := quran.NewQuranService(os.Getenv("M3O_API_TOKEN")) - rsp, err := quranService.Summary(&quran.SummaryRequest{ - Chapter: 1, - - }) - fmt.Println(rsp, err) - -} -``` diff --git a/examples/routing/README.md b/examples/routing/README.md index b7f4d07..f133a39 100755 --- a/examples/routing/README.md +++ b/examples/routing/README.md @@ -1,44 +1,9 @@ # Routing -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Routing/api](https://m3o.com/Routing/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/routing/api](https://m3o.com/routing/api). Endpoints: -## Route - -Retrieve a route as a simple list of gps points along with total distance and estimated duration - - -[https://m3o.com/routing/api#Route](https://m3o.com/routing/api#Route) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/routing" -) - -// Retrieve a route as a simple list of gps points along with total distance and estimated duration -func GpsPointsForAroute() { - routingService := routing.NewRoutingService(os.Getenv("M3O_API_TOKEN")) - rsp, err := routingService.Route(&routing.RouteRequest{ - Destination: &routing.Point{ - Latitude: 52.529407, - Longitude: 13.397634, -}, -Origin: &routing.Point{ - Latitude: 52.517037, - Longitude: 13.38886, -}, - - }) - fmt.Println(rsp, err) - -} -``` ## Eta Get the eta for a route from origin to destination. The eta is an estimated time based on car routes @@ -109,3 +74,38 @@ Origin: &routing.Point{ } ``` +## Route + +Retrieve a route as a simple list of gps points along with total distance and estimated duration + + +[https://m3o.com/routing/api#Route](https://m3o.com/routing/api#Route) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/routing" +) + +// Retrieve a route as a simple list of gps points along with total distance and estimated duration +func GpsPointsForAroute() { + routingService := routing.NewRoutingService(os.Getenv("M3O_API_TOKEN")) + rsp, err := routingService.Route(&routing.RouteRequest{ + Destination: &routing.Point{ + Latitude: 52.529407, + Longitude: 13.397634, +}, +Origin: &routing.Point{ + Latitude: 52.517037, + Longitude: 13.38886, +}, + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/rss/README.md b/examples/rss/README.md index bde5033..528df60 100755 --- a/examples/rss/README.md +++ b/examples/rss/README.md @@ -1,9 +1,37 @@ # Rss -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Rss/api](https://m3o.com/Rss/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/rss/api](https://m3o.com/rss/api). Endpoints: +## Feed + +Get an RSS feed by name. If no name is given, all feeds are returned. Default limit is 25 entries. + + +[https://m3o.com/rss/api#Feed](https://m3o.com/rss/api#Feed) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/rss" +) + +// Get an RSS feed by name. If no name is given, all feeds are returned. Default limit is 25 entries. +func ReadAfeed() { + rssService := rss.NewRssService(os.Getenv("M3O_API_TOKEN")) + rsp, err := rssService.Feed(&rss.FeedRequest{ + Name: "bbc", + + }) + fmt.Println(rsp, err) + +} +``` ## List List the saved RSS fields @@ -89,31 +117,3 @@ Url: "http://feeds.bbci.co.uk/news/rss.xml", } ``` -## Feed - -Get an RSS feed by name. If no name is given, all feeds are returned. Default limit is 25 entries. - - -[https://m3o.com/rss/api#Feed](https://m3o.com/rss/api#Feed) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/rss" -) - -// Get an RSS feed by name. If no name is given, all feeds are returned. Default limit is 25 entries. -func ReadAfeed() { - rssService := rss.NewRssService(os.Getenv("M3O_API_TOKEN")) - rsp, err := rssService.Feed(&rss.FeedRequest{ - Name: "bbc", - - }) - fmt.Println(rsp, err) - -} -``` diff --git a/examples/search/README.md b/examples/search/README.md index ffecb5b..c09d4e1 100755 --- a/examples/search/README.md +++ b/examples/search/README.md @@ -1,6 +1,6 @@ # Search -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Search/api](https://m3o.com/Search/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/search/api](https://m3o.com/search/api). Endpoints: @@ -27,9 +27,9 @@ func IndexAdocument() { rsp, err := searchService.Index(&search.IndexRequest{ Document: &search.Document{ Contents: map[string]interface{}{ + "name": "John Doe", "age": 37, "starsign": "Leo", - "name": "John Doe", }, Id: "1234", }, diff --git a/examples/sentiment/README.md b/examples/sentiment/README.md index 6ea4b3d..5bebe6a 100755 --- a/examples/sentiment/README.md +++ b/examples/sentiment/README.md @@ -1,6 +1,6 @@ # Sentiment -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Sentiment/api](https://m3o.com/Sentiment/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/sentiment/api](https://m3o.com/sentiment/api). Endpoints: diff --git a/examples/sms/README.md b/examples/sms/README.md index bef2be7..9db62b0 100755 --- a/examples/sms/README.md +++ b/examples/sms/README.md @@ -1,6 +1,6 @@ # Sms -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Sms/api](https://m3o.com/Sms/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/sms/api](https://m3o.com/sms/api). Endpoints: diff --git a/examples/space/README.md b/examples/space/README.md index 3d867ec..1bf72dc 100755 --- a/examples/space/README.md +++ b/examples/space/README.md @@ -1,9 +1,39 @@ # Space -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Space/api](https://m3o.com/Space/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/space/api](https://m3o.com/space/api). Endpoints: +## Create + +Create an object. Returns error if object with this name already exists. Max object size of 10MB, see Upload endpoint for larger objects. If you want to update an existing object use the `Update` endpoint + + +[https://m3o.com/space/api#Create](https://m3o.com/space/api#Create) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/space" +) + +// Create an object. Returns error if object with this name already exists. Max object size of 10MB, see Upload endpoint for larger objects. If you want to update an existing object use the `Update` endpoint +func CreateAnObject() { + spaceService := space.NewSpaceService(os.Getenv("M3O_API_TOKEN")) + rsp, err := spaceService.Create(&space.CreateRequest{ + Name: "images/file.jpg", +Object: "", +Visibility: "public", + + }) + fmt.Println(rsp, err) + +} +``` ## Update Update an object. If an object with this name does not exist, creates a new one. @@ -202,33 +232,3 @@ func UploadAnObject() { } ``` -## Create - -Create an object. Returns error if object with this name already exists. Max object size of 10MB, see Upload endpoint for larger objects. If you want to update an existing object use the `Update` endpoint - - -[https://m3o.com/space/api#Create](https://m3o.com/space/api#Create) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/space" -) - -// Create an object. Returns error if object with this name already exists. Max object size of 10MB, see Upload endpoint for larger objects. If you want to update an existing object use the `Update` endpoint -func CreateAnObject() { - spaceService := space.NewSpaceService(os.Getenv("M3O_API_TOKEN")) - rsp, err := spaceService.Create(&space.CreateRequest{ - Name: "images/file.jpg", -Object: "", -Visibility: "public", - - }) - fmt.Println(rsp, err) - -} -``` diff --git a/examples/spam/README.md b/examples/spam/README.md index c36f6d7..2620765 100755 --- a/examples/spam/README.md +++ b/examples/spam/README.md @@ -1,6 +1,6 @@ # Spam -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Spam/api](https://m3o.com/Spam/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/spam/api](https://m3o.com/spam/api). Endpoints: diff --git a/examples/stock/README.md b/examples/stock/README.md index 3090684..2018b54 100755 --- a/examples/stock/README.md +++ b/examples/stock/README.md @@ -1,66 +1,9 @@ # Stock -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Stock/api](https://m3o.com/Stock/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/stock/api](https://m3o.com/stock/api). Endpoints: -## Quote - -Get the last quote for the stock - - -[https://m3o.com/stock/api#Quote](https://m3o.com/stock/api#Quote) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/stock" -) - -// Get the last quote for the stock -func GetAstockQuote() { - stockService := stock.NewStockService(os.Getenv("M3O_API_TOKEN")) - rsp, err := stockService.Quote(&stock.QuoteRequest{ - Symbol: "AAPL", - - }) - fmt.Println(rsp, err) - -} -``` -## History - -Get the historic open-close for a given day - - -[https://m3o.com/stock/api#History](https://m3o.com/stock/api#History) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/stock" -) - -// Get the historic open-close for a given day -func GetHistoricData() { - stockService := stock.NewStockService(os.Getenv("M3O_API_TOKEN")) - rsp, err := stockService.History(&stock.HistoryRequest{ - Date: "2020-10-01", -Stock: "AAPL", - - }) - fmt.Println(rsp, err) - -} -``` ## OrderBook Get the historic order book and each trade by timestamp @@ -121,3 +64,60 @@ func GetAstockPrice() { } ``` +## Quote + +Get the last quote for the stock + + +[https://m3o.com/stock/api#Quote](https://m3o.com/stock/api#Quote) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/stock" +) + +// Get the last quote for the stock +func GetAstockQuote() { + stockService := stock.NewStockService(os.Getenv("M3O_API_TOKEN")) + rsp, err := stockService.Quote(&stock.QuoteRequest{ + Symbol: "AAPL", + + }) + fmt.Println(rsp, err) + +} +``` +## History + +Get the historic open-close for a given day + + +[https://m3o.com/stock/api#History](https://m3o.com/stock/api#History) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/stock" +) + +// Get the historic open-close for a given day +func GetHistoricData() { + stockService := stock.NewStockService(os.Getenv("M3O_API_TOKEN")) + rsp, err := stockService.History(&stock.HistoryRequest{ + Date: "2020-10-01", +Stock: "AAPL", + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/stream/README.md b/examples/stream/README.md index 08f1f1a..11fa9f3 100755 --- a/examples/stream/README.md +++ b/examples/stream/README.md @@ -1,40 +1,9 @@ # Stream -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Stream/api](https://m3o.com/Stream/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/stream/api](https://m3o.com/stream/api). Endpoints: -## CreateChannel - -Create a channel with a given name and description. Channels are created automatically but -this allows you to specify a description that's persisted for the lifetime of the channel. - - -[https://m3o.com/stream/api#CreateChannel](https://m3o.com/stream/api#CreateChannel) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/stream" -) - -// Create a channel with a given name and description. Channels are created automatically but -// this allows you to specify a description that's persisted for the lifetime of the channel. -func CreateChannel() { - streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN")) - rsp, err := streamService.CreateChannel(&stream.CreateChannelRequest{ - Description: "The channel for all things", -Name: "general", - - }) - fmt.Println(rsp, err) - -} -``` ## SendMessage Send a message to the stream. @@ -119,3 +88,34 @@ func ListChannels() { } ``` +## CreateChannel + +Create a channel with a given name and description. Channels are created automatically but +this allows you to specify a description that's persisted for the lifetime of the channel. + + +[https://m3o.com/stream/api#CreateChannel](https://m3o.com/stream/api#CreateChannel) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/stream" +) + +// Create a channel with a given name and description. Channels are created automatically but +// this allows you to specify a description that's persisted for the lifetime of the channel. +func CreateChannel() { + streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN")) + rsp, err := streamService.CreateChannel(&stream.CreateChannelRequest{ + Description: "The channel for all things", +Name: "general", + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/sunnah/README.md b/examples/sunnah/README.md index 0b5cf6e..68ccae1 100755 --- a/examples/sunnah/README.md +++ b/examples/sunnah/README.md @@ -1,38 +1,9 @@ # Sunnah -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Sunnah/api](https://m3o.com/Sunnah/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/sunnah/api](https://m3o.com/sunnah/api). Endpoints: -## Collections - -Get a list of available collections. A collection is -a compilation of hadiths collected and written by an author. - - -[https://m3o.com/sunnah/api#Collections](https://m3o.com/sunnah/api#Collections) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/sunnah" -) - -// Get a list of available collections. A collection is -// a compilation of hadiths collected and written by an author. -func ListAvailableCollections() { - sunnahService := sunnah.NewSunnahService(os.Getenv("M3O_API_TOKEN")) - rsp, err := sunnahService.Collections(&sunnah.CollectionsRequest{ - - }) - fmt.Println(rsp, err) - -} -``` ## Books Get a list of books from within a collection. A book can contain many chapters @@ -123,3 +94,32 @@ Collection: "bukhari", } ``` +## Collections + +Get a list of available collections. A collection is +a compilation of hadiths collected and written by an author. + + +[https://m3o.com/sunnah/api#Collections](https://m3o.com/sunnah/api#Collections) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/sunnah" +) + +// Get a list of available collections. A collection is +// a compilation of hadiths collected and written by an author. +func ListAvailableCollections() { + sunnahService := sunnah.NewSunnahService(os.Getenv("M3O_API_TOKEN")) + rsp, err := sunnahService.Collections(&sunnah.CollectionsRequest{ + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/thumbnail/README.md b/examples/thumbnail/README.md index a10eb06..fb613a5 100755 --- a/examples/thumbnail/README.md +++ b/examples/thumbnail/README.md @@ -1,6 +1,6 @@ # Thumbnail -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Thumbnail/api](https://m3o.com/Thumbnail/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/thumbnail/api](https://m3o.com/thumbnail/api). Endpoints: diff --git a/examples/time/README.md b/examples/time/README.md index 29b28b8..9aad631 100755 --- a/examples/time/README.md +++ b/examples/time/README.md @@ -1,6 +1,6 @@ # Time -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Time/api](https://m3o.com/Time/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/time/api](https://m3o.com/time/api). Endpoints: diff --git a/examples/translate/README.md b/examples/translate/README.md index b53f56d..750e3c4 100755 --- a/examples/translate/README.md +++ b/examples/translate/README.md @@ -1,6 +1,6 @@ # Translate -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Translate/api](https://m3o.com/Translate/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/translate/api](https://m3o.com/translate/api). Endpoints: diff --git a/examples/twitter/README.md b/examples/twitter/README.md index fd92920..19128ad 100755 --- a/examples/twitter/README.md +++ b/examples/twitter/README.md @@ -1,9 +1,64 @@ # Twitter -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Twitter/api](https://m3o.com/Twitter/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/twitter/api](https://m3o.com/twitter/api). Endpoints: +## Search + +Search for tweets with a simple query + + +[https://m3o.com/twitter/api#Search](https://m3o.com/twitter/api#Search) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/twitter" +) + +// Search for tweets with a simple query +func SearchForTweets() { + twitterService := twitter.NewTwitterService(os.Getenv("M3O_API_TOKEN")) + rsp, err := twitterService.Search(&twitter.SearchRequest{ + Query: "cats", + + }) + fmt.Println(rsp, err) + +} +``` +## Trends + +Get the current global trending topics + + +[https://m3o.com/twitter/api#Trends](https://m3o.com/twitter/api#Trends) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/twitter" +) + +// Get the current global trending topics +func GetTheCurrentGlobalTrendingTopics() { + twitterService := twitter.NewTwitterService(os.Getenv("M3O_API_TOKEN")) + rsp, err := twitterService.Trends(&twitter.TrendsRequest{ + + }) + fmt.Println(rsp, err) + +} +``` ## User Get a user's twitter profile @@ -61,58 +116,3 @@ Username: "m3oservices", } ``` -## Search - -Search for tweets with a simple query - - -[https://m3o.com/twitter/api#Search](https://m3o.com/twitter/api#Search) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/twitter" -) - -// Search for tweets with a simple query -func SearchForTweets() { - twitterService := twitter.NewTwitterService(os.Getenv("M3O_API_TOKEN")) - rsp, err := twitterService.Search(&twitter.SearchRequest{ - Query: "cats", - - }) - fmt.Println(rsp, err) - -} -``` -## Trends - -Get the current global trending topics - - -[https://m3o.com/twitter/api#Trends](https://m3o.com/twitter/api#Trends) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/twitter" -) - -// Get the current global trending topics -func GetTheCurrentGlobalTrendingTopics() { - twitterService := twitter.NewTwitterService(os.Getenv("M3O_API_TOKEN")) - rsp, err := twitterService.Trends(&twitter.TrendsRequest{ - - }) - fmt.Println(rsp, err) - -} -``` diff --git a/examples/url/README.md b/examples/url/README.md index 9a2a5c9..24bd71a 100755 --- a/examples/url/README.md +++ b/examples/url/README.md @@ -1,36 +1,9 @@ # Url -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Url/api](https://m3o.com/Url/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/url/api](https://m3o.com/url/api). Endpoints: -## List - -List all the shortened URLs - - -[https://m3o.com/url/api#List](https://m3o.com/url/api#List) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/url" -) - -// List all the shortened URLs -func ListYourShortenedUrls() { - urlService := url.NewUrlService(os.Getenv("M3O_API_TOKEN")) - rsp, err := urlService.List(&url.ListRequest{ - - }) - fmt.Println(rsp, err) - -} -``` ## Shorten Shorten a long URL @@ -85,3 +58,30 @@ func ResolveAshortUrlToAlongDestinationUrl() { } ``` +## List + +List all the shortened URLs + + +[https://m3o.com/url/api#List](https://m3o.com/url/api#List) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/url" +) + +// List all the shortened URLs +func ListYourShortenedUrls() { + urlService := url.NewUrlService(os.Getenv("M3O_API_TOKEN")) + rsp, err := urlService.List(&url.ListRequest{ + + }) + fmt.Println(rsp, err) + +} +``` diff --git a/examples/user/README.md b/examples/user/README.md index 1a87a31..416faf1 100755 --- a/examples/user/README.md +++ b/examples/user/README.md @@ -1,99 +1,9 @@ # User -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/User/api](https://m3o.com/User/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/user/api](https://m3o.com/user/api). Endpoints: -## Create - -Create a new user account. The email address and username for the account must be unique. - - -[https://m3o.com/user/api#Create](https://m3o.com/user/api#Create) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/user" -) - -// Create a new user account. The email address and username for the account must be unique. -func CreateAnAccount() { - userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.Create(&user.CreateRequest{ - Email: "joe@example.com", -Id: "user-1", -Password: "Password1", -Username: "joe", - - }) - fmt.Println(rsp, err) - -} -``` -## Update - -Update the account username or email - - -[https://m3o.com/user/api#Update](https://m3o.com/user/api#Update) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/user" -) - -// Update the account username or email -func UpdateAnAccount() { - userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.Update(&user.UpdateRequest{ - Email: "joe+2@example.com", -Id: "user-1", - - }) - fmt.Println(rsp, err) - -} -``` -## UpdatePassword - -Update the account password - - -[https://m3o.com/user/api#UpdatePassword](https://m3o.com/user/api#UpdatePassword) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/user" -) - -// Update the account password -func UpdateTheAccountPassword() { - userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.UpdatePassword(&user.UpdatePasswordRequest{ - ConfirmPassword: "Password2", -NewPassword: "Password2", -OldPassword: "Password1", - - }) - fmt.Println(rsp, err) - -} -``` ## SendPasswordResetEmail Send an email with a verification code to reset password. @@ -126,99 +36,6 @@ TextContent: `Hi there, }) fmt.Println(rsp, err) -} -``` -## ReadSession - -Read a session by the session id. In the event it has expired or is not found and error is returned. - - -[https://m3o.com/user/api#ReadSession](https://m3o.com/user/api#ReadSession) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/user" -) - -// Read a session by the session id. In the event it has expired or is not found and error is returned. -func ReadAsessionByTheSessionId() { - userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.ReadSession(&user.ReadSessionRequest{ - SessionId: "df91a612-5b24-4634-99ff-240220ab8f55", - - }) - fmt.Println(rsp, err) - -} -``` -## VerifyToken - -Check whether the token attached to MagicLink is valid or not. -Ideally, you need to call this endpoint from your http request -handler that handles the endpoint which is specified in the -SendMagicLink request. - - -[https://m3o.com/user/api#VerifyToken](https://m3o.com/user/api#VerifyToken) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/user" -) - -// Check whether the token attached to MagicLink is valid or not. -// Ideally, you need to call this endpoint from your http request -// handler that handles the endpoint which is specified in the -// SendMagicLink request. -func VerifyAtoken() { - userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.VerifyToken(&user.VerifyTokenRequest{ - Token: "EdsUiidouJJJLldjlloofUiorkojflsWWdld", - - }) - fmt.Println(rsp, err) - -} -``` -## ResetPassword - -Reset password with the code sent by the "SendPasswordResetEmail" endoint. - - -[https://m3o.com/user/api#ResetPassword](https://m3o.com/user/api#ResetPassword) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/user" -) - -// Reset password with the code sent by the "SendPasswordResetEmail" endoint. -func ResetPassword() { - userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.ResetPassword(&user.ResetPasswordRequest{ - Code: "012345", -ConfirmPassword: "NewPassword1", -Email: "joe@example.com", -NewPassword: "NewPassword1", - - }) - fmt.Println(rsp, err) - } ``` ## VerifyEmail @@ -250,12 +67,12 @@ Token: "012345", } ``` -## List +## ReadSession -List all users. Returns a paged list of results +Read a session by the session id. In the event it has expired or is not found and error is returned. -[https://m3o.com/user/api#List](https://m3o.com/user/api#List) +[https://m3o.com/user/api#ReadSession](https://m3o.com/user/api#ReadSession) ```go package example @@ -267,12 +84,77 @@ import( "go.m3o.com/user" ) -// List all users. Returns a paged list of results -func ListAllUsers() { +// Read a session by the session id. In the event it has expired or is not found and error is returned. +func ReadAsessionByTheSessionId() { userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.List(&user.ListRequest{ - Limit: 100, -Offset: 0, + rsp, err := userService.ReadSession(&user.ReadSessionRequest{ + SessionId: "df91a612-5b24-4634-99ff-240220ab8f55", + + }) + fmt.Println(rsp, err) + +} +``` +## SendMagicLink + +Login using email only - Passwordless + + +[https://m3o.com/user/api#SendMagicLink](https://m3o.com/user/api#SendMagicLink) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/user" +) + +// Login using email only - Passwordless +func SendAmagicLink() { + userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) + rsp, err := userService.SendMagicLink(&user.SendMagicLinkRequest{ + Address: "www.example.com", +Email: "joe@example.com", +Endpoint: "verifytoken", +FromName: "Awesome Dot Com", +Subject: "MagicLink to access your account", +TextContent: `Hi there, + +Click here to access your account $micro_verification_link`, + + }) + fmt.Println(rsp, err) + +} +``` +## Create + +Create a new user account. The email address and username for the account must be unique. + + +[https://m3o.com/user/api#Create](https://m3o.com/user/api#Create) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/user" +) + +// Create a new user account. The email address and username for the account must be unique. +func CreateAnAccount() { + userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) + rsp, err := userService.Create(&user.CreateRequest{ + Email: "joe@example.com", +Id: "user-1", +Password: "Password1", +Username: "joe", }) fmt.Println(rsp, err) @@ -361,6 +243,121 @@ func ReadAccountByEmail() { }) fmt.Println(rsp, err) +} +``` +## Delete + +Delete an account by id + + +[https://m3o.com/user/api#Delete](https://m3o.com/user/api#Delete) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/user" +) + +// Delete an account by id +func DeleteUserAccount() { + userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) + rsp, err := userService.Delete(&user.DeleteRequest{ + Id: "8b98acbe-0b6a-4d66-a414-5ffbf666786f", + + }) + fmt.Println(rsp, err) + +} +``` +## Logout + +Logout a user account + + +[https://m3o.com/user/api#Logout](https://m3o.com/user/api#Logout) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/user" +) + +// Logout a user account +func LogAuserOut() { + userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) + rsp, err := userService.Logout(&user.LogoutRequest{ + SessionId: "df91a612-5b24-4634-99ff-240220ab8f55", + + }) + fmt.Println(rsp, err) + +} +``` +## Update + +Update the account username or email + + +[https://m3o.com/user/api#Update](https://m3o.com/user/api#Update) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/user" +) + +// Update the account username or email +func UpdateAnAccount() { + userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) + rsp, err := userService.Update(&user.UpdateRequest{ + Email: "joe+2@example.com", +Id: "user-1", + + }) + fmt.Println(rsp, err) + +} +``` +## UpdatePassword + +Update the account password + + +[https://m3o.com/user/api#UpdatePassword](https://m3o.com/user/api#UpdatePassword) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/user" +) + +// Update the account password +func UpdateTheAccountPassword() { + userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) + rsp, err := userService.UpdatePassword(&user.UpdatePasswordRequest{ + ConfirmPassword: "Password2", +NewPassword: "Password2", +OldPassword: "Password1", + + }) + fmt.Println(rsp, err) + } ``` ## SendVerificationEmail @@ -408,34 +405,6 @@ Please verify your email by clicking this link: $micro_verification_link`, }) fmt.Println(rsp, err) -} -``` -## Delete - -Delete an account by id - - -[https://m3o.com/user/api#Delete](https://m3o.com/user/api#Delete) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/user" -) - -// Delete an account by id -func DeleteUserAccount() { - userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.Delete(&user.DeleteRequest{ - Id: "8b98acbe-0b6a-4d66-a414-5ffbf666786f", - - }) - fmt.Println(rsp, err) - } ``` ## Login @@ -469,12 +438,15 @@ Password: "Password1", } ``` -## SendMagicLink +## VerifyToken -Login using email only - Passwordless +Check whether the token attached to MagicLink is valid or not. +Ideally, you need to call this endpoint from your http request +handler that handles the endpoint which is specified in the +SendMagicLink request. -[https://m3o.com/user/api#SendMagicLink](https://m3o.com/user/api#SendMagicLink) +[https://m3o.com/user/api#VerifyToken](https://m3o.com/user/api#VerifyToken) ```go package example @@ -486,30 +458,57 @@ import( "go.m3o.com/user" ) -// Login using email only - Passwordless -func SendAmagicLink() { +// Check whether the token attached to MagicLink is valid or not. +// Ideally, you need to call this endpoint from your http request +// handler that handles the endpoint which is specified in the +// SendMagicLink request. +func VerifyAtoken() { userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.SendMagicLink(&user.SendMagicLinkRequest{ - Address: "www.example.com", + rsp, err := userService.VerifyToken(&user.VerifyTokenRequest{ + Token: "EdsUiidouJJJLldjlloofUiorkojflsWWdld", + + }) + fmt.Println(rsp, err) + +} +``` +## ResetPassword + +Reset password with the code sent by the "SendPasswordResetEmail" endoint. + + +[https://m3o.com/user/api#ResetPassword](https://m3o.com/user/api#ResetPassword) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/user" +) + +// Reset password with the code sent by the "SendPasswordResetEmail" endoint. +func ResetPassword() { + userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) + rsp, err := userService.ResetPassword(&user.ResetPasswordRequest{ + Code: "012345", +ConfirmPassword: "NewPassword1", Email: "joe@example.com", -Endpoint: "verifytoken", -FromName: "Awesome Dot Com", -Subject: "MagicLink to access your account", -TextContent: `Hi there, - -Click here to access your account $micro_verification_link`, +NewPassword: "NewPassword1", }) fmt.Println(rsp, err) } ``` -## Logout +## List -Logout a user account +List all users. Returns a paged list of results -[https://m3o.com/user/api#Logout](https://m3o.com/user/api#Logout) +[https://m3o.com/user/api#List](https://m3o.com/user/api#List) ```go package example @@ -521,11 +520,12 @@ import( "go.m3o.com/user" ) -// Logout a user account -func LogAuserOut() { +// List all users. Returns a paged list of results +func ListAllUsers() { userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.Logout(&user.LogoutRequest{ - SessionId: "df91a612-5b24-4634-99ff-240220ab8f55", + rsp, err := userService.List(&user.ListRequest{ + Limit: 100, +Offset: 0, }) fmt.Println(rsp, err) diff --git a/examples/vehicle/README.md b/examples/vehicle/README.md index e2b8847..b113043 100755 --- a/examples/vehicle/README.md +++ b/examples/vehicle/README.md @@ -1,6 +1,6 @@ # Vehicle -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Vehicle/api](https://m3o.com/Vehicle/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/vehicle/api](https://m3o.com/vehicle/api). Endpoints: diff --git a/examples/weather/README.md b/examples/weather/README.md index c29cb3d..4fa715b 100755 --- a/examples/weather/README.md +++ b/examples/weather/README.md @@ -1,6 +1,6 @@ # Weather -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Weather/api](https://m3o.com/Weather/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/weather/api](https://m3o.com/weather/api). Endpoints: diff --git a/examples/youtube/README.md b/examples/youtube/README.md index 908ecd5..a866acf 100755 --- a/examples/youtube/README.md +++ b/examples/youtube/README.md @@ -1,6 +1,6 @@ # Youtube -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Youtube/api](https://m3o.com/Youtube/api). +An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/youtube/api](https://m3o.com/youtube/api). Endpoints: