diff --git a/address/address.go b/address/address.go index e775315..40e4b01 100755 --- a/address/address.go +++ b/address/address.go @@ -1,7 +1,7 @@ package address import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewAddressService(token string) *AddressService { diff --git a/answer/answer.go b/answer/answer.go index 881e67f..9c7a53c 100755 --- a/answer/answer.go +++ b/answer/answer.go @@ -1,7 +1,7 @@ package answer import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewAnswerService(token string) *AnswerService { diff --git a/cache/cache.go b/cache/cache.go index ebbc9b1..130c697 100755 --- a/cache/cache.go +++ b/cache/cache.go @@ -1,7 +1,7 @@ package cache import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewCacheService(token string) *CacheService { diff --git a/crypto/crypto.go b/crypto/crypto.go index ea85643..cc82cea 100755 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -1,7 +1,7 @@ package crypto import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewCryptoService(token string) *CryptoService { diff --git a/currency/currency.go b/currency/currency.go index c3410b0..db4fea5 100755 --- a/currency/currency.go +++ b/currency/currency.go @@ -1,7 +1,7 @@ package currency import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewCurrencyService(token string) *CurrencyService { diff --git a/db/db.go b/db/db.go index faa4e5d..7c6d9d7 100755 --- a/db/db.go +++ b/db/db.go @@ -1,7 +1,7 @@ package db import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewDbService(token string) *DbService { diff --git a/email/email.go b/email/email.go index 8cc63d3..ee60657 100755 --- a/email/email.go +++ b/email/email.go @@ -1,7 +1,7 @@ package email import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewEmailService(token string) *EmailService { diff --git a/emoji/emoji.go b/emoji/emoji.go index 783c405..78d64c0 100755 --- a/emoji/emoji.go +++ b/emoji/emoji.go @@ -1,7 +1,7 @@ package emoji import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewEmojiService(token string) *EmojiService { diff --git a/evchargers/evchargers.go b/evchargers/evchargers.go index b24c707..dbe4d1c 100755 --- a/evchargers/evchargers.go +++ b/evchargers/evchargers.go @@ -1,7 +1,7 @@ package evchargers import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewEvchargersService(token string) *EvchargersService { diff --git a/examples/address/README.md b/examples/address/README.md index 4677456..7b38a9a 100755 --- a/examples/address/README.md +++ b/examples/address/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/address" + "go.m3o.com/address" ) // Lookup a list of UK addresses by postcode diff --git a/examples/address/lookupPostcode/lookupPostcode.go b/examples/address/lookupPostcode/lookupPostcode.go index 456412d..94def3a 100755 --- a/examples/address/lookupPostcode/lookupPostcode.go +++ b/examples/address/lookupPostcode/lookupPostcode.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/address" + "go.m3o.com/address" ) // Lookup a list of UK addresses by postcode diff --git a/examples/answer/README.md b/examples/answer/README.md index c56dfe6..ef2dc2a 100755 --- a/examples/answer/README.md +++ b/examples/answer/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/answer" + "go.m3o.com/answer" ) // Ask a question and receive an instant answer diff --git a/examples/answer/question/askAQuestion.go b/examples/answer/question/askAQuestion.go index 14f96c1..0f5eeca 100755 --- a/examples/answer/question/askAQuestion.go +++ b/examples/answer/question/askAQuestion.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/answer" + "go.m3o.com/answer" ) // Ask a question and receive an instant answer diff --git a/examples/cache/README.md b/examples/cache/README.md index 7a06dbf..b79b7ce 100755 --- a/examples/cache/README.md +++ b/examples/cache/README.md @@ -4,88 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Cache/api](htt Endpoints: -## Set - -Set an item in the cache. Overwrites any existing value already set. - - -[https://m3o.com/cache/api#Set](https://m3o.com/cache/api#Set) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/cache" -) - -// Set an item in the cache. Overwrites any existing value already set. -func SetAvalue() { - cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN")) - rsp, err := cacheService.Set(&cache.SetRequest{ - Key: "foo", -Value: "bar", - - }) - fmt.Println(rsp, err) -} -``` -## Get - -Get an item from the cache by key - - -[https://m3o.com/cache/api#Get](https://m3o.com/cache/api#Get) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/cache" -) - -// Get an item from the cache by key -func GetAvalue() { - cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN")) - rsp, err := cacheService.Get(&cache.GetRequest{ - Key: "foo", - - }) - fmt.Println(rsp, err) -} -``` -## Delete - -Delete a value from the cache - - -[https://m3o.com/cache/api#Delete](https://m3o.com/cache/api#Delete) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/cache" -) - -// Delete a value from the cache -func DeleteAvalue() { - cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN")) - rsp, err := cacheService.Delete(&cache.DeleteRequest{ - Key: "foo", - - }) - fmt.Println(rsp, err) -} -``` ## Increment Increment a value (if it's a number) @@ -100,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/cache" + "go.m3o.com/cache" ) // Increment a value (if it's a number) @@ -128,7 +46,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/cache" + "go.m3o.com/cache" ) // Decrement a value (if it's a number) @@ -142,3 +60,85 @@ Value: 2, fmt.Println(rsp, err) } ``` +## Set + +Set an item in the cache. Overwrites any existing value already set. + + +[https://m3o.com/cache/api#Set](https://m3o.com/cache/api#Set) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/cache" +) + +// Set an item in the cache. Overwrites any existing value already set. +func SetAvalue() { + cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN")) + rsp, err := cacheService.Set(&cache.SetRequest{ + Key: "foo", +Value: "bar", + + }) + fmt.Println(rsp, err) +} +``` +## Get + +Get an item from the cache by key + + +[https://m3o.com/cache/api#Get](https://m3o.com/cache/api#Get) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/cache" +) + +// Get an item from the cache by key +func GetAvalue() { + cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN")) + rsp, err := cacheService.Get(&cache.GetRequest{ + Key: "foo", + + }) + fmt.Println(rsp, err) +} +``` +## Delete + +Delete a value from the cache + + +[https://m3o.com/cache/api#Delete](https://m3o.com/cache/api#Delete) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/cache" +) + +// Delete a value from the cache +func DeleteAvalue() { + cacheService := cache.NewCacheService(os.Getenv("M3O_API_TOKEN")) + rsp, err := cacheService.Delete(&cache.DeleteRequest{ + Key: "foo", + + }) + fmt.Println(rsp, err) +} +``` diff --git a/examples/cache/decrement/decrementAValue.go b/examples/cache/decrement/decrementAValue.go index 21526f9..1822230 100755 --- a/examples/cache/decrement/decrementAValue.go +++ b/examples/cache/decrement/decrementAValue.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/cache" + "go.m3o.com/cache" ) // Decrement a value (if it's a number) diff --git a/examples/cache/delete/deleteAValue.go b/examples/cache/delete/deleteAValue.go index 47f34b5..ec5e794 100755 --- a/examples/cache/delete/deleteAValue.go +++ b/examples/cache/delete/deleteAValue.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/cache" + "go.m3o.com/cache" ) // Delete a value from the cache diff --git a/examples/cache/get/getAValue.go b/examples/cache/get/getAValue.go index 95858cb..c37ee8e 100755 --- a/examples/cache/get/getAValue.go +++ b/examples/cache/get/getAValue.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/cache" + "go.m3o.com/cache" ) // Get an item from the cache by key diff --git a/examples/cache/increment/incrementAValue.go b/examples/cache/increment/incrementAValue.go index f43c563..effc4cc 100755 --- a/examples/cache/increment/incrementAValue.go +++ b/examples/cache/increment/incrementAValue.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/cache" + "go.m3o.com/cache" ) // Increment a value (if it's a number) diff --git a/examples/cache/set/setAValue.go b/examples/cache/set/setAValue.go index a7879c3..3a7080e 100755 --- a/examples/cache/set/setAValue.go +++ b/examples/cache/set/setAValue.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/cache" + "go.m3o.com/cache" ) // Set an item in the cache. Overwrites any existing value already set. diff --git a/examples/crypto/README.md b/examples/crypto/README.md index 75152eb..e9b36a4 100755 --- a/examples/crypto/README.md +++ b/examples/crypto/README.md @@ -4,33 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Crypto/api](ht Endpoints: -## News - -Get news related to a currency - - -[https://m3o.com/crypto/api#News](https://m3o.com/crypto/api#News) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/crypto" -) - -// Get news related to a currency -func GetCryptocurrencyNews() { - cryptoService := crypto.NewCryptoService(os.Getenv("M3O_API_TOKEN")) - rsp, err := cryptoService.News(&crypto.NewsRequest{ - Symbol: "BTCUSD", - - }) - fmt.Println(rsp, err) -} -``` ## Price Get the last price for a given crypto ticker @@ -45,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/crypto" + "go.m3o.com/crypto" ) // Get the last price for a given crypto ticker @@ -72,7 +45,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/crypto" + "go.m3o.com/crypto" ) // Get the last quote for a given crypto ticker @@ -99,7 +72,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/crypto" + "go.m3o.com/crypto" ) // Returns the history for the previous close @@ -112,3 +85,30 @@ func GetPreviousClose() { fmt.Println(rsp, err) } ``` +## News + +Get news related to a currency + + +[https://m3o.com/crypto/api#News](https://m3o.com/crypto/api#News) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/crypto" +) + +// Get news related to a currency +func GetCryptocurrencyNews() { + cryptoService := crypto.NewCryptoService(os.Getenv("M3O_API_TOKEN")) + rsp, err := cryptoService.News(&crypto.NewsRequest{ + Symbol: "BTCUSD", + + }) + fmt.Println(rsp, err) +} +``` diff --git a/examples/crypto/history/getPreviousClose.go b/examples/crypto/history/getPreviousClose.go index 5105c5d..21d0bbd 100755 --- a/examples/crypto/history/getPreviousClose.go +++ b/examples/crypto/history/getPreviousClose.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/crypto" + "go.m3o.com/crypto" ) // Returns the history for the previous close diff --git a/examples/crypto/news/getCryptocurrencyNews.go b/examples/crypto/news/getCryptocurrencyNews.go index 76df79e..efe3cbb 100755 --- a/examples/crypto/news/getCryptocurrencyNews.go +++ b/examples/crypto/news/getCryptocurrencyNews.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/crypto" + "go.m3o.com/crypto" ) // Get news related to a currency diff --git a/examples/crypto/price/getCryptocurrencyPrice.go b/examples/crypto/price/getCryptocurrencyPrice.go index ab37217..b159697 100755 --- a/examples/crypto/price/getCryptocurrencyPrice.go +++ b/examples/crypto/price/getCryptocurrencyPrice.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/crypto" + "go.m3o.com/crypto" ) // Get the last price for a given crypto ticker diff --git a/examples/crypto/quote/getACryptocurrencyQuote.go b/examples/crypto/quote/getACryptocurrencyQuote.go index 31ab9cc..f092aca 100755 --- a/examples/crypto/quote/getACryptocurrencyQuote.go +++ b/examples/crypto/quote/getACryptocurrencyQuote.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/crypto" + "go.m3o.com/crypto" ) // Get the last quote for a given crypto ticker diff --git a/examples/currency/README.md b/examples/currency/README.md index a179a2a..e79ce2a 100755 --- a/examples/currency/README.md +++ b/examples/currency/README.md @@ -4,33 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Currency/api]( Endpoints: -## Rates - -Rates returns the currency rates for a given code e.g USD - - -[https://m3o.com/currency/api#Rates](https://m3o.com/currency/api#Rates) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/currency" -) - -// Rates returns the currency rates for a given code e.g USD -func GetRatesForUsd() { - currencyService := currency.NewCurrencyService(os.Getenv("M3O_API_TOKEN")) - rsp, err := currencyService.Rates(¤cy.RatesRequest{ - Code: "USD", - - }) - fmt.Println(rsp, err) -} -``` ## Convert Convert returns the currency conversion rate between two pairs e.g USD/GBP @@ -45,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/currency" + "go.m3o.com/currency" ) // Convert returns the currency conversion rate between two pairs e.g USD/GBP @@ -73,7 +46,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/currency" + "go.m3o.com/currency" ) // Convert returns the currency conversion rate between two pairs e.g USD/GBP @@ -102,7 +75,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/currency" + "go.m3o.com/currency" ) // Returns the historic rates for a currency on a given date @@ -130,7 +103,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/currency" + "go.m3o.com/currency" ) // Codes returns the supported currency codes for the API @@ -142,3 +115,30 @@ func GetSupportedCodes() { fmt.Println(rsp, err) } ``` +## Rates + +Rates returns the currency rates for a given code e.g USD + + +[https://m3o.com/currency/api#Rates](https://m3o.com/currency/api#Rates) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/currency" +) + +// Rates returns the currency rates for a given code e.g USD +func GetRatesForUsd() { + currencyService := currency.NewCurrencyService(os.Getenv("M3O_API_TOKEN")) + rsp, err := currencyService.Rates(¤cy.RatesRequest{ + Code: "USD", + + }) + fmt.Println(rsp, err) +} +``` diff --git a/examples/currency/codes/getSupportedCodes.go b/examples/currency/codes/getSupportedCodes.go index 7b1510f..74a705c 100755 --- a/examples/currency/codes/getSupportedCodes.go +++ b/examples/currency/codes/getSupportedCodes.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/currency" + "go.m3o.com/currency" ) // Codes returns the supported currency codes for the API diff --git a/examples/currency/convert/convert10UsdToGbp.go b/examples/currency/convert/convert10UsdToGbp.go index f813626..3f13935 100755 --- a/examples/currency/convert/convert10UsdToGbp.go +++ b/examples/currency/convert/convert10UsdToGbp.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/currency" + "go.m3o.com/currency" ) // Convert returns the currency conversion rate between two pairs e.g USD/GBP diff --git a/examples/currency/convert/convertUsdToGbp.go b/examples/currency/convert/convertUsdToGbp.go index 34e83f9..3998b3e 100755 --- a/examples/currency/convert/convertUsdToGbp.go +++ b/examples/currency/convert/convertUsdToGbp.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/currency" + "go.m3o.com/currency" ) // Convert returns the currency conversion rate between two pairs e.g USD/GBP diff --git a/examples/currency/history/historicRatesForACurrency.go b/examples/currency/history/historicRatesForACurrency.go index 81ee458..81e2ae9 100755 --- a/examples/currency/history/historicRatesForACurrency.go +++ b/examples/currency/history/historicRatesForACurrency.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/currency" + "go.m3o.com/currency" ) // Returns the historic rates for a currency on a given date diff --git a/examples/currency/rates/getRatesForUsd.go b/examples/currency/rates/getRatesForUsd.go index 51225e5..a4b1d03 100755 --- a/examples/currency/rates/getRatesForUsd.go +++ b/examples/currency/rates/getRatesForUsd.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/currency" + "go.m3o.com/currency" ) // Rates returns the currency rates for a given code e.g USD diff --git a/examples/db/README.md b/examples/db/README.md index 923923b..1d5449e 100755 --- a/examples/db/README.md +++ b/examples/db/README.md @@ -4,60 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Db/api](https: Endpoints: -## Truncate - -Truncate the records in a table - - -[https://m3o.com/db/api#Truncate](https://m3o.com/db/api#Truncate) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/db" -) - -// Truncate the records in a table -func TruncateTable() { - dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) - rsp, err := dbService.Truncate(&db.TruncateRequest{ - Table: "users", - - }) - fmt.Println(rsp, err) -} -``` -## Count - -Count records in a table - - -[https://m3o.com/db/api#Count](https://m3o.com/db/api#Count) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/db" -) - -// Count records in a table -func CountEntriesInAtable() { - dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) - rsp, err := dbService.Count(&db.CountRequest{ - Table: "users", - - }) - fmt.Println(rsp, err) -} -``` ## Create Create a record in the database. Optionally include an "id" field otherwise it's set automatically. @@ -72,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Create a record in the database. Optionally include an "id" field otherwise it's set automatically. @@ -80,10 +26,10 @@ func CreateArecord() { dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) rsp, err := dbService.Create(&db.CreateRequest{ Record: map[string]interface{}{ - "isActive": true, "id": "1", "name": "Jane", "age": 42, + "isActive": true, }, Table: "users", @@ -105,7 +51,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Update a record in the database. Include an "id" in the record to update. @@ -136,7 +82,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Read data from a table. Lookup can be by ID or via querying any field in the record. @@ -164,7 +110,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Delete a record in the database by id. @@ -178,3 +124,57 @@ Table: "users", fmt.Println(rsp, err) } ``` +## Truncate + +Truncate the records in a table + + +[https://m3o.com/db/api#Truncate](https://m3o.com/db/api#Truncate) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/db" +) + +// Truncate the records in a table +func TruncateTable() { + dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) + rsp, err := dbService.Truncate(&db.TruncateRequest{ + Table: "users", + + }) + fmt.Println(rsp, err) +} +``` +## Count + +Count records in a table + + +[https://m3o.com/db/api#Count](https://m3o.com/db/api#Count) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/db" +) + +// Count records in a table +func CountEntriesInAtable() { + dbService := db.NewDbService(os.Getenv("M3O_API_TOKEN")) + rsp, err := dbService.Count(&db.CountRequest{ + Table: "users", + + }) + fmt.Println(rsp, err) +} +``` diff --git a/examples/db/count/countEntriesInATable.go b/examples/db/count/countEntriesInATable.go index 695365c..13342a3 100755 --- a/examples/db/count/countEntriesInATable.go +++ b/examples/db/count/countEntriesInATable.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Count records in a table diff --git a/examples/db/create/createARecord.go b/examples/db/create/createARecord.go index 3c7d116..688b6e8 100755 --- a/examples/db/create/createARecord.go +++ b/examples/db/create/createARecord.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Create a record in the database. Optionally include an "id" field otherwise it's set automatically. @@ -12,10 +12,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: "users", }) diff --git a/examples/db/delete/deleteARecord.go b/examples/db/delete/deleteARecord.go index e43cffb..b7c739b 100755 --- a/examples/db/delete/deleteARecord.go +++ b/examples/db/delete/deleteARecord.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Delete a record in the database by id. diff --git a/examples/db/read/readRecords.go b/examples/db/read/readRecords.go index d6b229d..7f211ba 100755 --- a/examples/db/read/readRecords.go +++ b/examples/db/read/readRecords.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Read data from a table. Lookup can be by ID or via querying any field in the record. diff --git a/examples/db/truncate/truncateTable.go b/examples/db/truncate/truncateTable.go index 6e69533..da721d0 100755 --- a/examples/db/truncate/truncateTable.go +++ b/examples/db/truncate/truncateTable.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Truncate the records in a table diff --git a/examples/db/update/updateARecord.go b/examples/db/update/updateARecord.go index 65f7d6f..378a5d6 100755 --- a/examples/db/update/updateARecord.go +++ b/examples/db/update/updateARecord.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/db" + "go.m3o.com/db" ) // Update a record in the database. Include an "id" in the record to update. diff --git a/examples/email/README.md b/examples/email/README.md index 519bcc2..7c2e1f4 100755 --- a/examples/email/README.md +++ b/examples/email/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/email" + "go.m3o.com/email" ) // Send an email by passing in from, to, subject, and a text or html body diff --git a/examples/email/send/sendEmail.go b/examples/email/send/sendEmail.go index 6f382b8..29045f0 100755 --- a/examples/email/send/sendEmail.go +++ b/examples/email/send/sendEmail.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/email" + "go.m3o.com/email" ) // Send an email by passing in from, to, subject, and a text or html body diff --git a/examples/emoji/README.md b/examples/emoji/README.md index 96cce3f..8907f04 100755 --- a/examples/emoji/README.md +++ b/examples/emoji/README.md @@ -4,6 +4,61 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Emoji/api](htt Endpoints: +## Flag + +Get the flag for a country. Requires country code e.g GB for great britain + + +[https://m3o.com/emoji/api#Flag](https://m3o.com/emoji/api#Flag) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/emoji" +) + +// Get the flag for a country. Requires country code e.g GB for great britain +func GetFlagByCountryCode() { + emojiService := emoji.NewEmojiService(os.Getenv("M3O_API_TOKEN")) + rsp, err := emojiService.Flag(&emoji.FlagRequest{ + + }) + fmt.Println(rsp, err) +} +``` +## Print + +Print text and renders the emojis with aliases e.g +let's grab a :beer: becomes let's grab a 🍺 + + +[https://m3o.com/emoji/api#Print](https://m3o.com/emoji/api#Print) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/emoji" +) + +// Print text and renders the emojis with aliases e.g +// let's grab a :beer: becomes let's grab a 🍺 +func PrintTextIncludingEmoji() { + emojiService := emoji.NewEmojiService(os.Getenv("M3O_API_TOKEN")) + rsp, err := emojiService.Print(&emoji.PrintRequest{ + Text: "let's grab a :beer:", + + }) + fmt.Println(rsp, err) +} +``` ## Send Send an emoji to anyone via SMS. Messages are sent in the form ' Sent from ' @@ -18,7 +73,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/emoji" + "go.m3o.com/emoji" ) // Send an emoji to anyone via SMS. Messages are sent in the form ' Sent from ' @@ -47,7 +102,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/emoji" + "go.m3o.com/emoji" ) // Find an emoji by its alias e.g :beer: @@ -60,58 +115,3 @@ func FindEmoji() { fmt.Println(rsp, err) } ``` -## Flag - -Get the flag for a country. Requires country code e.g GB for great britain - - -[https://m3o.com/emoji/api#Flag](https://m3o.com/emoji/api#Flag) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/emoji" -) - -// Get the flag for a country. Requires country code e.g GB for great britain -func GetFlagByCountryCode() { - emojiService := emoji.NewEmojiService(os.Getenv("M3O_API_TOKEN")) - rsp, err := emojiService.Flag(&emoji.FlagRequest{ - - }) - fmt.Println(rsp, err) -} -``` -## Print - -Print text and renders the emojis with aliases e.g -let's grab a :beer: becomes let's grab a 🍺 - - -[https://m3o.com/emoji/api#Print](https://m3o.com/emoji/api#Print) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/emoji" -) - -// Print text and renders the emojis with aliases e.g -// let's grab a :beer: becomes let's grab a 🍺 -func PrintTextIncludingEmoji() { - emojiService := emoji.NewEmojiService(os.Getenv("M3O_API_TOKEN")) - rsp, err := emojiService.Print(&emoji.PrintRequest{ - Text: "let's grab a :beer:", - - }) - fmt.Println(rsp, err) -} -``` diff --git a/examples/emoji/find/findEmoji.go b/examples/emoji/find/findEmoji.go index 33acd3f..aefc906 100755 --- a/examples/emoji/find/findEmoji.go +++ b/examples/emoji/find/findEmoji.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/emoji" + "go.m3o.com/emoji" ) // Find an emoji by its alias e.g :beer: diff --git a/examples/emoji/flag/getFlagByCountryCode.go b/examples/emoji/flag/getFlagByCountryCode.go index 6ec6bf7..990ebf4 100755 --- a/examples/emoji/flag/getFlagByCountryCode.go +++ b/examples/emoji/flag/getFlagByCountryCode.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/emoji" + "go.m3o.com/emoji" ) // Get the flag for a country. Requires country code e.g GB for great britain diff --git a/examples/emoji/print/printTextIncludingEmoji.go b/examples/emoji/print/printTextIncludingEmoji.go index 065de45..72a752e 100755 --- a/examples/emoji/print/printTextIncludingEmoji.go +++ b/examples/emoji/print/printTextIncludingEmoji.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/emoji" + "go.m3o.com/emoji" ) // Print text and renders the emojis with aliases e.g diff --git a/examples/emoji/send/sendATextContainingAnEmojiToAnyoneViaSms.go b/examples/emoji/send/sendATextContainingAnEmojiToAnyoneViaSms.go index 3448d7f..28cdfd6 100755 --- a/examples/emoji/send/sendATextContainingAnEmojiToAnyoneViaSms.go +++ b/examples/emoji/send/sendATextContainingAnEmojiToAnyoneViaSms.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/emoji" + "go.m3o.com/emoji" ) // Send an emoji to anyone via SMS. Messages are sent in the form ' Sent from ' diff --git a/examples/evchargers/README.md b/examples/evchargers/README.md index 627f7be..d687fe8 100755 --- a/examples/evchargers/README.md +++ b/examples/evchargers/README.md @@ -4,6 +4,32 @@ An [m3o.com](https://m3o.com) API. For example usage see [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 @@ -18,7 +44,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/evchargers" + "go.m3o.com/evchargers" ) // Search by giving a coordinate and a max distance, or bounding box and optional filters @@ -49,7 +75,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/evchargers" + "go.m3o.com/evchargers" ) // Search by giving a coordinate and a max distance, or bounding box and optional filters @@ -77,7 +103,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/evchargers" + "go.m3o.com/evchargers" ) // Search by giving a coordinate and a max distance, or bounding box and optional filters @@ -95,29 +121,3 @@ Location: &evchargers.Coordinates{ fmt.Println(rsp, err) } ``` -## 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" - - "github.com/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/evchargers/referenceData/getReferenceData.go b/examples/evchargers/referenceData/getReferenceData.go index e31eaf4..3f607ce 100755 --- a/examples/evchargers/referenceData/getReferenceData.go +++ b/examples/evchargers/referenceData/getReferenceData.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/evchargers" + "go.m3o.com/evchargers" ) // Retrieve reference data as used by this API and in conjunction with the Search endpoint diff --git a/examples/evchargers/search/searchByBoundingBox.go b/examples/evchargers/search/searchByBoundingBox.go index 6f5e71a..db41c58 100755 --- a/examples/evchargers/search/searchByBoundingBox.go +++ b/examples/evchargers/search/searchByBoundingBox.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/evchargers" + "go.m3o.com/evchargers" ) // Search by giving a coordinate and a max distance, or bounding box and optional filters diff --git a/examples/evchargers/search/searchByLocation.go b/examples/evchargers/search/searchByLocation.go index df0ae26..6282ba6 100755 --- a/examples/evchargers/search/searchByLocation.go +++ b/examples/evchargers/search/searchByLocation.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/evchargers" + "go.m3o.com/evchargers" ) // Search by giving a coordinate and a max distance, or bounding box and optional filters diff --git a/examples/evchargers/search/searchWithFiltersFastChargersOnly.go b/examples/evchargers/search/searchWithFiltersFastChargersOnly.go index 7a43c3a..c1fe2ab 100755 --- a/examples/evchargers/search/searchWithFiltersFastChargersOnly.go +++ b/examples/evchargers/search/searchWithFiltersFastChargersOnly.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/evchargers" + "go.m3o.com/evchargers" ) // Search by giving a coordinate and a max distance, or bounding box and optional filters diff --git a/examples/file/README.md b/examples/file/README.md index d5e9b51..68a6a0a 100755 --- a/examples/file/README.md +++ b/examples/file/README.md @@ -4,6 +4,37 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/File/api](http Endpoints: +## Save + +Save a file + + +[https://m3o.com/file/api#Save](https://m3o.com/file/api#Save) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/file" +) + +// Save a file +func SaveFile() { + fileService := file.NewFileService(os.Getenv("M3O_API_TOKEN")) + rsp, err := fileService.Save(&file.SaveRequest{ + File: &file.Record{ + Content: "file content example", + Path: "/document/text-files/file.txt", + Project: "examples", + }, + + }) + fmt.Println(rsp, err) +} +``` ## List List files by their project and optionally a path. @@ -18,7 +49,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/file" + "go.m3o.com/file" ) // List files by their project and optionally a path. @@ -45,7 +76,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/file" + "go.m3o.com/file" ) // Delete a file by project name/path @@ -73,7 +104,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/file" + "go.m3o.com/file" ) // Read a file by path @@ -87,34 +118,3 @@ Project: "examples", fmt.Println(rsp, err) } ``` -## Save - -Save a file - - -[https://m3o.com/file/api#Save](https://m3o.com/file/api#Save) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/file" -) - -// Save a file -func SaveFile() { - fileService := file.NewFileService(os.Getenv("M3O_API_TOKEN")) - rsp, err := fileService.Save(&file.SaveRequest{ - File: &file.Record{ - Content: "file content example", - Path: "/document/text-files/file.txt", - Project: "examples", - }, - - }) - fmt.Println(rsp, err) -} -``` diff --git a/examples/file/delete/deleteFile.go b/examples/file/delete/deleteFile.go index 9db89e0..8bd0748 100755 --- a/examples/file/delete/deleteFile.go +++ b/examples/file/delete/deleteFile.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/file" + "go.m3o.com/file" ) // Delete a file by project name/path diff --git a/examples/file/list/listFiles.go b/examples/file/list/listFiles.go index 83f570b..41d0b94 100755 --- a/examples/file/list/listFiles.go +++ b/examples/file/list/listFiles.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/file" + "go.m3o.com/file" ) // List files by their project and optionally a path. diff --git a/examples/file/read/readFile.go b/examples/file/read/readFile.go index 1ec71fa..33c61c4 100755 --- a/examples/file/read/readFile.go +++ b/examples/file/read/readFile.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/file" + "go.m3o.com/file" ) // Read a file by path diff --git a/examples/file/save/saveFile.go b/examples/file/save/saveFile.go index d588765..bf2345e 100755 --- a/examples/file/save/saveFile.go +++ b/examples/file/save/saveFile.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/file" + "go.m3o.com/file" ) // Save a file diff --git a/examples/forex/README.md b/examples/forex/README.md index f750a23..8fe80a6 100755 --- a/examples/forex/README.md +++ b/examples/forex/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/forex" + "go.m3o.com/forex" ) // Get the latest price for a given forex ticker @@ -45,7 +45,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/forex" + "go.m3o.com/forex" ) // Get the latest quote for the forex @@ -72,7 +72,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/forex" + "go.m3o.com/forex" ) // Returns the data for the previous close diff --git a/examples/forex/history/getPreviousClose.go b/examples/forex/history/getPreviousClose.go index 5efaf11..f95c222 100755 --- a/examples/forex/history/getPreviousClose.go +++ b/examples/forex/history/getPreviousClose.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/forex" + "go.m3o.com/forex" ) // Returns the data for the previous close diff --git a/examples/forex/price/getAnFxPrice.go b/examples/forex/price/getAnFxPrice.go index 27fc948..786cd7a 100755 --- a/examples/forex/price/getAnFxPrice.go +++ b/examples/forex/price/getAnFxPrice.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/forex" + "go.m3o.com/forex" ) // Get the latest price for a given forex ticker diff --git a/examples/forex/quote/getAFxQuote.go b/examples/forex/quote/getAFxQuote.go index 8c3de35..483ca33 100755 --- a/examples/forex/quote/getAFxQuote.go +++ b/examples/forex/quote/getAFxQuote.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/forex" + "go.m3o.com/forex" ) // Get the latest quote for the forex diff --git a/examples/function/README.md b/examples/function/README.md index e51ce68..3a72ea5 100755 --- a/examples/function/README.md +++ b/examples/function/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // Deploy a group of functions @@ -49,7 +49,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // Call a function by name @@ -78,7 +78,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // List all the deployed functions @@ -104,7 +104,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // Delete a function by name @@ -132,7 +132,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // Get the info for a deployed function diff --git a/examples/function/call/callAFunction.go b/examples/function/call/callAFunction.go index b97aff8..79fd52a 100755 --- a/examples/function/call/callAFunction.go +++ b/examples/function/call/callAFunction.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // Call a function by name diff --git a/examples/function/delete/deleteAFunction.go b/examples/function/delete/deleteAFunction.go index a24fe75..46562d1 100755 --- a/examples/function/delete/deleteAFunction.go +++ b/examples/function/delete/deleteAFunction.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // Delete a function by name diff --git a/examples/function/deploy/deployAFunction.go b/examples/function/deploy/deployAFunction.go index 6ddfb3f..bd006f1 100755 --- a/examples/function/deploy/deployAFunction.go +++ b/examples/function/deploy/deployAFunction.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // Deploy a group of functions diff --git a/examples/function/describe/describeFunctionStatus.go b/examples/function/describe/describeFunctionStatus.go index cb44f0a..284a0e0 100755 --- a/examples/function/describe/describeFunctionStatus.go +++ b/examples/function/describe/describeFunctionStatus.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // Get the info for a deployed function diff --git a/examples/function/list/listFunctions.go b/examples/function/list/listFunctions.go index 07f6efd..2e52b17 100755 --- a/examples/function/list/listFunctions.go +++ b/examples/function/list/listFunctions.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/function" + "go.m3o.com/function" ) // List all the deployed functions diff --git a/examples/geocoding/README.md b/examples/geocoding/README.md index 822f3e7..448d333 100755 --- a/examples/geocoding/README.md +++ b/examples/geocoding/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/geocoding" + "go.m3o.com/geocoding" ) // Lookup returns a geocoded address including normalized address and gps coordinates. All fields are optional, provide more to get more accurate results @@ -48,7 +48,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/geocoding" + "go.m3o.com/geocoding" ) // Reverse lookup an address from gps coordinates diff --git a/examples/geocoding/lookup/geocodeAnAddress.go b/examples/geocoding/lookup/geocodeAnAddress.go index c66d775..b305e5f 100755 --- a/examples/geocoding/lookup/geocodeAnAddress.go +++ b/examples/geocoding/lookup/geocodeAnAddress.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/geocoding" + "go.m3o.com/geocoding" ) // Lookup returns a geocoded address including normalized address and gps coordinates. All fields are optional, provide more to get more accurate results diff --git a/examples/geocoding/reverse/reverseGeocodeLocation.go b/examples/geocoding/reverse/reverseGeocodeLocation.go index 1884546..a075ee8 100755 --- a/examples/geocoding/reverse/reverseGeocodeLocation.go +++ b/examples/geocoding/reverse/reverseGeocodeLocation.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/geocoding" + "go.m3o.com/geocoding" ) // Reverse lookup an address from gps coordinates diff --git a/examples/gifs/README.md b/examples/gifs/README.md index 6f26ddb..3e7b371 100755 --- a/examples/gifs/README.md +++ b/examples/gifs/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/gifs" + "go.m3o.com/gifs" ) // Search for a GIF diff --git a/examples/gifs/search/search.go b/examples/gifs/search/search.go index 1bb75dc..34f42f9 100755 --- a/examples/gifs/search/search.go +++ b/examples/gifs/search/search.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/gifs" + "go.m3o.com/gifs" ) // Search for a GIF diff --git a/examples/google/README.md b/examples/google/README.md index 5474e56..80278a9 100755 --- a/examples/google/README.md +++ b/examples/google/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/google" + "go.m3o.com/google" ) // Search for videos on Google diff --git a/examples/google/search/searchForVideos.go b/examples/google/search/searchForVideos.go index 9becc9b..edcfd9d 100755 --- a/examples/google/search/searchForVideos.go +++ b/examples/google/search/searchForVideos.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/google" + "go.m3o.com/google" ) // Search for videos on Google diff --git a/examples/helloworld/README.md b/examples/helloworld/README.md index 03d21a0..5765925 100755 --- a/examples/helloworld/README.md +++ b/examples/helloworld/README.md @@ -4,33 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Helloworld/api Endpoints: -## Call - -Call returns a personalised "Hello $name" response - - -[https://m3o.com/helloworld/api#Call](https://m3o.com/helloworld/api#Call) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/helloworld" -) - -// Call returns a personalised "Hello $name" response -func CallTheHelloworldService() { - helloworldService := helloworld.NewHelloworldService(os.Getenv("M3O_API_TOKEN")) - rsp, err := helloworldService.Call(&helloworld.CallRequest{ - Name: "John", - - }) - fmt.Println(rsp, err) -} -``` ## Stream Stream returns a stream of "Hello $name" responses @@ -45,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/helloworld" + "go.m3o.com/helloworld" ) // Stream returns a stream of "Hello $name" responses @@ -58,3 +31,30 @@ func StreamsAreCurrentlyTemporarilyNotSupportedInClients() { fmt.Println(rsp, err) } ``` +## Call + +Call returns a personalised "Hello $name" response + + +[https://m3o.com/helloworld/api#Call](https://m3o.com/helloworld/api#Call) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/helloworld" +) + +// Call returns a personalised "Hello $name" response +func CallTheHelloworldService() { + helloworldService := helloworld.NewHelloworldService(os.Getenv("M3O_API_TOKEN")) + rsp, err := helloworldService.Call(&helloworld.CallRequest{ + Name: "John", + + }) + fmt.Println(rsp, err) +} +``` diff --git a/examples/helloworld/call/callTheHelloworldService.go b/examples/helloworld/call/callTheHelloworldService.go index 5d8c928..914c294 100755 --- a/examples/helloworld/call/callTheHelloworldService.go +++ b/examples/helloworld/call/callTheHelloworldService.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/helloworld" + "go.m3o.com/helloworld" ) // Call returns a personalised "Hello $name" response diff --git a/examples/helloworld/stream/streamsAreCurrentlyTemporarilyNotSupportedInClients.go b/examples/helloworld/stream/streamsAreCurrentlyTemporarilyNotSupportedInClients.go index c20d842..9dde953 100755 --- a/examples/helloworld/stream/streamsAreCurrentlyTemporarilyNotSupportedInClients.go +++ b/examples/helloworld/stream/streamsAreCurrentlyTemporarilyNotSupportedInClients.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/helloworld" + "go.m3o.com/helloworld" ) // Stream returns a stream of "Hello $name" responses diff --git a/examples/holidays/README.md b/examples/holidays/README.md index bf74a39..1e49dab 100755 --- a/examples/holidays/README.md +++ b/examples/holidays/README.md @@ -4,33 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Holidays/api]( Endpoints: -## List - -List the holiday dates for a given country and year - - -[https://m3o.com/holidays/api#List](https://m3o.com/holidays/api#List) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/holidays" -) - -// List the holiday dates for a given country and year -func GetHolidays() { - holidaysService := holidays.NewHolidaysService(os.Getenv("M3O_API_TOKEN")) - rsp, err := holidaysService.List(&holidays.ListRequest{ - Year: 2022, - - }) - fmt.Println(rsp, err) -} -``` ## Countries Get the list of countries that are supported by this API @@ -45,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/holidays" + "go.m3o.com/holidays" ) // Get the list of countries that are supported by this API @@ -57,3 +30,30 @@ func ListCountries() { fmt.Println(rsp, err) } ``` +## List + +List the holiday dates for a given country and year + + +[https://m3o.com/holidays/api#List](https://m3o.com/holidays/api#List) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/holidays" +) + +// List the holiday dates for a given country and year +func GetHolidays() { + holidaysService := holidays.NewHolidaysService(os.Getenv("M3O_API_TOKEN")) + rsp, err := holidaysService.List(&holidays.ListRequest{ + Year: 2022, + + }) + fmt.Println(rsp, err) +} +``` diff --git a/examples/holidays/countries/listCountries.go b/examples/holidays/countries/listCountries.go index ceba9a1..629b93c 100755 --- a/examples/holidays/countries/listCountries.go +++ b/examples/holidays/countries/listCountries.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/holidays" + "go.m3o.com/holidays" ) // Get the list of countries that are supported by this API diff --git a/examples/holidays/list/getHolidays.go b/examples/holidays/list/getHolidays.go index 82a5093..4e7d28d 100755 --- a/examples/holidays/list/getHolidays.go +++ b/examples/holidays/list/getHolidays.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/holidays" + "go.m3o.com/holidays" ) // List the holiday dates for a given country and year diff --git a/examples/id/README.md b/examples/id/README.md index 94f7cc7..a3713d1 100755 --- a/examples/id/README.md +++ b/examples/id/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // Generate a unique ID. Defaults to uuid. @@ -45,7 +45,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // Generate a unique ID. Defaults to uuid. @@ -72,7 +72,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // Generate a unique ID. Defaults to uuid. @@ -99,7 +99,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // Generate a unique ID. Defaults to uuid. @@ -126,7 +126,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // List the types of IDs available. No query params needed. diff --git a/examples/id/generate/generateABigflakeId.go b/examples/id/generate/generateABigflakeId.go index 69f7a6d..19d8c27 100755 --- a/examples/id/generate/generateABigflakeId.go +++ b/examples/id/generate/generateABigflakeId.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // Generate a unique ID. Defaults to uuid. diff --git a/examples/id/generate/generateAShortId.go b/examples/id/generate/generateAShortId.go index ba0ac4b..0ac68be 100755 --- a/examples/id/generate/generateAShortId.go +++ b/examples/id/generate/generateAShortId.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // Generate a unique ID. Defaults to uuid. diff --git a/examples/id/generate/generateASnowflakeId.go b/examples/id/generate/generateASnowflakeId.go index 8572130..625b05d 100755 --- a/examples/id/generate/generateASnowflakeId.go +++ b/examples/id/generate/generateASnowflakeId.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // Generate a unique ID. Defaults to uuid. diff --git a/examples/id/generate/generateAUniqueId.go b/examples/id/generate/generateAUniqueId.go index 980eb55..8a4e527 100755 --- a/examples/id/generate/generateAUniqueId.go +++ b/examples/id/generate/generateAUniqueId.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // Generate a unique ID. Defaults to uuid. diff --git a/examples/id/types/listTheTypesOfIdsAvailable.go b/examples/id/types/listTheTypesOfIdsAvailable.go index 50dd9ba..ef576ef 100755 --- a/examples/id/types/listTheTypesOfIdsAvailable.go +++ b/examples/id/types/listTheTypesOfIdsAvailable.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/id" + "go.m3o.com/id" ) // List the types of IDs available. No query params needed. diff --git a/examples/image/README.md b/examples/image/README.md index 09b6966..1d58d10 100755 --- a/examples/image/README.md +++ b/examples/image/README.md @@ -20,7 +20,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Resize an image on the fly without storing it (by sending and receiving a base64 encoded image), or resize and upload depending on parameters. @@ -54,7 +54,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Resize an image on the fly without storing it (by sending and receiving a base64 encoded image), or resize and upload depending on parameters. @@ -87,7 +87,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Resize an image on the fly without storing it (by sending and receiving a base64 encoded image), or resize and upload depending on parameters. @@ -123,7 +123,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Convert an image from one format (jpeg, png etc.) to an other either on the fly (from base64 to base64), @@ -153,7 +153,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Upload an image by either sending a base64 encoded image to this endpoint or a URL. @@ -183,7 +183,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Upload an image by either sending a base64 encoded image to this endpoint or a URL. diff --git a/examples/image/convert/convertAPngImageToAJpegTakenFromAUrlAndSavedToAUrlOnMicrosCdn.go b/examples/image/convert/convertAPngImageToAJpegTakenFromAUrlAndSavedToAUrlOnMicrosCdn.go index 21e6abb..fcc62f2 100755 --- a/examples/image/convert/convertAPngImageToAJpegTakenFromAUrlAndSavedToAUrlOnMicrosCdn.go +++ b/examples/image/convert/convertAPngImageToAJpegTakenFromAUrlAndSavedToAUrlOnMicrosCdn.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Convert an image from one format (jpeg, png etc.) to an other either on the fly (from base64 to base64), diff --git a/examples/image/resize/base64ToBase64Image.go b/examples/image/resize/base64ToBase64Image.go index 2cfe417..d031c22 100755 --- a/examples/image/resize/base64ToBase64Image.go +++ b/examples/image/resize/base64ToBase64Image.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Resize an image on the fly without storing it (by sending and receiving a base64 encoded image), or resize and upload depending on parameters. diff --git a/examples/image/resize/base64ToBase64ImageWithCropping.go b/examples/image/resize/base64ToBase64ImageWithCropping.go index bfdafab..ae2bdfc 100755 --- a/examples/image/resize/base64ToBase64ImageWithCropping.go +++ b/examples/image/resize/base64ToBase64ImageWithCropping.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Resize an image on the fly without storing it (by sending and receiving a base64 encoded image), or resize and upload depending on parameters. diff --git a/examples/image/resize/base64ToHostedImage.go b/examples/image/resize/base64ToHostedImage.go index b73542e..94e8ee3 100755 --- a/examples/image/resize/base64ToHostedImage.go +++ b/examples/image/resize/base64ToHostedImage.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Resize an image on the fly without storing it (by sending and receiving a base64 encoded image), or resize and upload depending on parameters. diff --git a/examples/image/upload/uploadABase64ImageToMicrosCdn.go b/examples/image/upload/uploadABase64ImageToMicrosCdn.go index 8bb6a94..b2bbf7e 100755 --- a/examples/image/upload/uploadABase64ImageToMicrosCdn.go +++ b/examples/image/upload/uploadABase64ImageToMicrosCdn.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Upload an image by either sending a base64 encoded image to this endpoint or a URL. diff --git a/examples/image/upload/uploadAnImageFromAUrlToMicrosCdn.go b/examples/image/upload/uploadAnImageFromAUrlToMicrosCdn.go index 3f60ed3..6e63d91 100755 --- a/examples/image/upload/uploadAnImageFromAUrlToMicrosCdn.go +++ b/examples/image/upload/uploadAnImageFromAUrlToMicrosCdn.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/image" + "go.m3o.com/image" ) // Upload an image by either sending a base64 encoded image to this endpoint or a URL. diff --git a/examples/ip/README.md b/examples/ip/README.md index 3b550b5..ab99d55 100755 --- a/examples/ip/README.md +++ b/examples/ip/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/ip" + "go.m3o.com/ip" ) // Lookup the geolocation information for an IP address diff --git a/examples/ip/lookup/lookupIpInfo.go b/examples/ip/lookup/lookupIpInfo.go index b7461d8..5028317 100755 --- a/examples/ip/lookup/lookupIpInfo.go +++ b/examples/ip/lookup/lookupIpInfo.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/ip" + "go.m3o.com/ip" ) // Lookup the geolocation information for an IP address diff --git a/examples/location/README.md b/examples/location/README.md index 713d40a..828fe78 100755 --- a/examples/location/README.md +++ b/examples/location/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/location" + "go.m3o.com/location" ) // Save an entity's current position @@ -53,7 +53,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/location" + "go.m3o.com/location" ) // Read an entity by its ID @@ -80,7 +80,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/location" + "go.m3o.com/location" ) // Search for entities in a given radius diff --git a/examples/location/read/getLocationById.go b/examples/location/read/getLocationById.go index e5a5656..880b1be 100755 --- a/examples/location/read/getLocationById.go +++ b/examples/location/read/getLocationById.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/location" + "go.m3o.com/location" ) // Read an entity by its ID diff --git a/examples/location/save/saveAnEntity.go b/examples/location/save/saveAnEntity.go index 002af1a..58c2e46 100755 --- a/examples/location/save/saveAnEntity.go +++ b/examples/location/save/saveAnEntity.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/location" + "go.m3o.com/location" ) // Save an entity's current position diff --git a/examples/location/search/searchForLocations.go b/examples/location/search/searchForLocations.go index 2f385f6..8a9e0f6 100755 --- a/examples/location/search/searchForLocations.go +++ b/examples/location/search/searchForLocations.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/location" + "go.m3o.com/location" ) // Search for entities in a given radius diff --git a/examples/notes/README.md b/examples/notes/README.md index a9bd086..aff356f 100755 --- a/examples/notes/README.md +++ b/examples/notes/README.md @@ -4,34 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Notes/api](htt Endpoints: -## Create - -Create a new note - - -[https://m3o.com/notes/api#Create](https://m3o.com/notes/api#Create) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/notes" -) - -// Create a new note -func CreateAnote() { - notesService := notes.NewNotesService(os.Getenv("M3O_API_TOKEN")) - rsp, err := notesService.Create(¬es.CreateRequest{ - Text: "This is my note", -Title: "New Note", - - }) - fmt.Println(rsp, err) -} -``` ## Read Read a note @@ -46,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/notes" + "go.m3o.com/notes" ) // Read a note @@ -73,7 +45,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/notes" + "go.m3o.com/notes" ) // List all the notes @@ -99,7 +71,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/notes" + "go.m3o.com/notes" ) // Update a note @@ -130,7 +102,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/notes" + "go.m3o.com/notes" ) // Delete a note @@ -143,3 +115,31 @@ func DeleteAnote() { fmt.Println(rsp, err) } ``` +## Create + +Create a new note + + +[https://m3o.com/notes/api#Create](https://m3o.com/notes/api#Create) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/notes" +) + +// Create a new note +func CreateAnote() { + notesService := notes.NewNotesService(os.Getenv("M3O_API_TOKEN")) + rsp, err := notesService.Create(¬es.CreateRequest{ + Text: "This is my note", +Title: "New Note", + + }) + fmt.Println(rsp, err) +} +``` diff --git a/examples/notes/create/createANote.go b/examples/notes/create/createANote.go index 4e76635..298cf9b 100755 --- a/examples/notes/create/createANote.go +++ b/examples/notes/create/createANote.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/notes" + "go.m3o.com/notes" ) // Create a new note diff --git a/examples/notes/delete/deleteANote.go b/examples/notes/delete/deleteANote.go index 712ded7..2861fac 100755 --- a/examples/notes/delete/deleteANote.go +++ b/examples/notes/delete/deleteANote.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/notes" + "go.m3o.com/notes" ) // Delete a note diff --git a/examples/notes/list/listAllNotes.go b/examples/notes/list/listAllNotes.go index 8885823..d5c855c 100755 --- a/examples/notes/list/listAllNotes.go +++ b/examples/notes/list/listAllNotes.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/notes" + "go.m3o.com/notes" ) // List all the notes diff --git a/examples/notes/read/readANote.go b/examples/notes/read/readANote.go index d9858d8..e0e2ff4 100755 --- a/examples/notes/read/readANote.go +++ b/examples/notes/read/readANote.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/notes" + "go.m3o.com/notes" ) // Read a note diff --git a/examples/notes/update/updateANote.go b/examples/notes/update/updateANote.go index 2ae701b..eb866af 100755 --- a/examples/notes/update/updateANote.go +++ b/examples/notes/update/updateANote.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/notes" + "go.m3o.com/notes" ) // Update a note diff --git a/examples/otp/README.md b/examples/otp/README.md index c3a956b..d1ab2a1 100755 --- a/examples/otp/README.md +++ b/examples/otp/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/otp" + "go.m3o.com/otp" ) // Generate an OTP (one time pass) code @@ -45,7 +45,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/otp" + "go.m3o.com/otp" ) // Validate the OTP code diff --git a/examples/otp/generate/generateOtp.go b/examples/otp/generate/generateOtp.go index 49a3f0d..ed23207 100755 --- a/examples/otp/generate/generateOtp.go +++ b/examples/otp/generate/generateOtp.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/otp" + "go.m3o.com/otp" ) // Generate an OTP (one time pass) code diff --git a/examples/otp/validate/validateOtp.go b/examples/otp/validate/validateOtp.go index 824ab7c..4fa8c6a 100755 --- a/examples/otp/validate/validateOtp.go +++ b/examples/otp/validate/validateOtp.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/otp" + "go.m3o.com/otp" ) // Validate the OTP code diff --git a/examples/postcode/README.md b/examples/postcode/README.md index d7ce589..8ad6f68 100755 --- a/examples/postcode/README.md +++ b/examples/postcode/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/postcode" + "go.m3o.com/postcode" ) // Lookup a postcode to retrieve the related region, county, etc @@ -45,7 +45,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/postcode" + "go.m3o.com/postcode" ) // Return a random postcode and its related info @@ -71,7 +71,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/postcode" + "go.m3o.com/postcode" ) // Validate a postcode. diff --git a/examples/postcode/lookup/lookupPostcode.go b/examples/postcode/lookup/lookupPostcode.go index 5324faa..eeaf99c 100755 --- a/examples/postcode/lookup/lookupPostcode.go +++ b/examples/postcode/lookup/lookupPostcode.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/postcode" + "go.m3o.com/postcode" ) // Lookup a postcode to retrieve the related region, county, etc diff --git a/examples/postcode/random/returnARandomPostcodeAndItsInformation.go b/examples/postcode/random/returnARandomPostcodeAndItsInformation.go index b869d28..fe3e310 100755 --- a/examples/postcode/random/returnARandomPostcodeAndItsInformation.go +++ b/examples/postcode/random/returnARandomPostcodeAndItsInformation.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/postcode" + "go.m3o.com/postcode" ) // Return a random postcode and its related info diff --git a/examples/postcode/validate/returnARandomPostcodeAndItsInformation.go b/examples/postcode/validate/returnARandomPostcodeAndItsInformation.go index 7377c8e..7dbb9dd 100755 --- a/examples/postcode/validate/returnARandomPostcodeAndItsInformation.go +++ b/examples/postcode/validate/returnARandomPostcodeAndItsInformation.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/postcode" + "go.m3o.com/postcode" ) // Validate a postcode. diff --git a/examples/prayer/README.md b/examples/prayer/README.md index a2ccbd2..8befb95 100755 --- a/examples/prayer/README.md +++ b/examples/prayer/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/prayer" + "go.m3o.com/prayer" ) // Get the prayer (salah) times for a location on a given date diff --git a/examples/prayer/times/prayerTimes.go b/examples/prayer/times/prayerTimes.go index 3a067e9..cec3924 100755 --- a/examples/prayer/times/prayerTimes.go +++ b/examples/prayer/times/prayerTimes.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/prayer" + "go.m3o.com/prayer" ) // Get the prayer (salah) times for a location on a given date diff --git a/examples/qr/README.md b/examples/qr/README.md index 4d5d129..85773cd 100755 --- a/examples/qr/README.md +++ b/examples/qr/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/qr" + "go.m3o.com/qr" ) // Generate a QR code with a specific text and size diff --git a/examples/qr/generate/generateAQrCode.go b/examples/qr/generate/generateAQrCode.go index 012f3e9..653bcea 100755 --- a/examples/qr/generate/generateAQrCode.go +++ b/examples/qr/generate/generateAQrCode.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/qr" + "go.m3o.com/qr" ) // Generate a QR code with a specific text and size diff --git a/examples/quran/README.md b/examples/quran/README.md index 61604c8..79165db 100755 --- a/examples/quran/README.md +++ b/examples/quran/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/quran" + "go.m3o.com/quran" ) // List the Chapters (surahs) of the Quran @@ -45,7 +45,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/quran" + "go.m3o.com/quran" ) // Get a summary for a given chapter (surah) @@ -74,7 +74,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/quran" + "go.m3o.com/quran" ) // Lookup the verses (ayahs) for a chapter including @@ -103,7 +103,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/quran" + "go.m3o.com/quran" ) // Search the Quran for any form of query or questions diff --git a/examples/quran/chapters/listChapters.go b/examples/quran/chapters/listChapters.go index 5392f2f..b84d16a 100755 --- a/examples/quran/chapters/listChapters.go +++ b/examples/quran/chapters/listChapters.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/quran" + "go.m3o.com/quran" ) // List the Chapters (surahs) of the Quran diff --git a/examples/quran/search/searchTheQuran.go b/examples/quran/search/searchTheQuran.go index 892dfb8..4e921d0 100755 --- a/examples/quran/search/searchTheQuran.go +++ b/examples/quran/search/searchTheQuran.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/quran" + "go.m3o.com/quran" ) // Search the Quran for any form of query or questions diff --git a/examples/quran/summary/getChapterSummary.go b/examples/quran/summary/getChapterSummary.go index c114d77..fc2df6e 100755 --- a/examples/quran/summary/getChapterSummary.go +++ b/examples/quran/summary/getChapterSummary.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/quran" + "go.m3o.com/quran" ) // Get a summary for a given chapter (surah) diff --git a/examples/quran/verses/getVersesOfAChapter.go b/examples/quran/verses/getVersesOfAChapter.go index 27eb428..0c6f10a 100755 --- a/examples/quran/verses/getVersesOfAChapter.go +++ b/examples/quran/verses/getVersesOfAChapter.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/quran" + "go.m3o.com/quran" ) // Lookup the verses (ayahs) for a chapter including diff --git a/examples/routing/README.md b/examples/routing/README.md index 540ca23..8f4968f 100755 --- a/examples/routing/README.md +++ b/examples/routing/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/routing" + "go.m3o.com/routing" ) // Get the eta for a route from origin to destination. The eta is an estimated time based on car routes @@ -52,7 +52,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/routing" + "go.m3o.com/routing" ) // Turn by turn directions from a start point to an end point including maneuvers and bearings @@ -86,7 +86,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/routing" + "go.m3o.com/routing" ) // Retrieve a route as a simple list of gps points along with total distance and estimated duration diff --git a/examples/routing/directions/turnByTurnDirections.go b/examples/routing/directions/turnByTurnDirections.go index 1ec4469..76336d9 100755 --- a/examples/routing/directions/turnByTurnDirections.go +++ b/examples/routing/directions/turnByTurnDirections.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/routing" + "go.m3o.com/routing" ) // Turn by turn directions from a start point to an end point including maneuvers and bearings diff --git a/examples/routing/eta/etaFromPointAToPointB.go b/examples/routing/eta/etaFromPointAToPointB.go index fb2d9ee..e463d85 100755 --- a/examples/routing/eta/etaFromPointAToPointB.go +++ b/examples/routing/eta/etaFromPointAToPointB.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/routing" + "go.m3o.com/routing" ) // Get the eta for a route from origin to destination. The eta is an estimated time based on car routes diff --git a/examples/routing/route/gpsPointsForARoute.go b/examples/routing/route/gpsPointsForARoute.go index 2b1cd7e..5aa23ff 100755 --- a/examples/routing/route/gpsPointsForARoute.go +++ b/examples/routing/route/gpsPointsForARoute.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/routing" + "go.m3o.com/routing" ) // Retrieve a route as a simple list of gps points along with total distance and estimated duration diff --git a/examples/rss/README.md b/examples/rss/README.md index 527fe1d..b7bbb60 100755 --- a/examples/rss/README.md +++ b/examples/rss/README.md @@ -4,35 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Rss/api](https Endpoints: -## Add - -Add a new RSS feed with a name, url, and category - - -[https://m3o.com/rss/api#Add](https://m3o.com/rss/api#Add) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/rss" -) - -// Add a new RSS feed with a name, url, and category -func AddAnewFeed() { - rssService := rss.NewRssService(os.Getenv("M3O_API_TOKEN")) - rsp, err := rssService.Add(&rss.AddRequest{ - Category: "news", -Name: "bbc", -Url: "http://feeds.bbci.co.uk/news/rss.xml", - - }) - fmt.Println(rsp, err) -} -``` ## Feed Get an RSS feed by name. If no name is given, all feeds are returned. Default limit is 25 entries. @@ -47,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/rss" + "go.m3o.com/rss" ) // Get an RSS feed by name. If no name is given, all feeds are returned. Default limit is 25 entries. @@ -74,7 +45,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/rss" + "go.m3o.com/rss" ) // List the saved RSS fields @@ -100,7 +71,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/rss" + "go.m3o.com/rss" ) // Remove an RSS feed by name @@ -113,3 +84,32 @@ func RemoveAfeed() { fmt.Println(rsp, err) } ``` +## Add + +Add a new RSS feed with a name, url, and category + + +[https://m3o.com/rss/api#Add](https://m3o.com/rss/api#Add) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/rss" +) + +// Add a new RSS feed with a name, url, and category +func AddAnewFeed() { + rssService := rss.NewRssService(os.Getenv("M3O_API_TOKEN")) + rsp, err := rssService.Add(&rss.AddRequest{ + Category: "news", +Name: "bbc", +Url: "http://feeds.bbci.co.uk/news/rss.xml", + + }) + fmt.Println(rsp, err) +} +``` diff --git a/examples/rss/add/addANewFeed.go b/examples/rss/add/addANewFeed.go index eea53da..be048be 100755 --- a/examples/rss/add/addANewFeed.go +++ b/examples/rss/add/addANewFeed.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/rss" + "go.m3o.com/rss" ) // Add a new RSS feed with a name, url, and category diff --git a/examples/rss/feed/readAFeed.go b/examples/rss/feed/readAFeed.go index 562a949..fd62089 100755 --- a/examples/rss/feed/readAFeed.go +++ b/examples/rss/feed/readAFeed.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/rss" + "go.m3o.com/rss" ) // Get an RSS feed by name. If no name is given, all feeds are returned. Default limit is 25 entries. diff --git a/examples/rss/list/listRssFeeds.go b/examples/rss/list/listRssFeeds.go index f8b3873..03f4a7b 100755 --- a/examples/rss/list/listRssFeeds.go +++ b/examples/rss/list/listRssFeeds.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/rss" + "go.m3o.com/rss" ) // List the saved RSS fields diff --git a/examples/rss/remove/removeAFeed.go b/examples/rss/remove/removeAFeed.go index cb09213..36c6619 100755 --- a/examples/rss/remove/removeAFeed.go +++ b/examples/rss/remove/removeAFeed.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/rss" + "go.m3o.com/rss" ) // Remove an RSS feed by name diff --git a/examples/sentiment/README.md b/examples/sentiment/README.md index 4fdecc2..3ddbcaa 100755 --- a/examples/sentiment/README.md +++ b/examples/sentiment/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/sentiment" + "go.m3o.com/sentiment" ) // Analyze and score a piece of text diff --git a/examples/sentiment/analyze/analyzeAPieceOfText.go b/examples/sentiment/analyze/analyzeAPieceOfText.go index c1be3d7..5778c90 100755 --- a/examples/sentiment/analyze/analyzeAPieceOfText.go +++ b/examples/sentiment/analyze/analyzeAPieceOfText.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/sentiment" + "go.m3o.com/sentiment" ) // Analyze and score a piece of text diff --git a/examples/sms/README.md b/examples/sms/README.md index cfaf1dc..20f47f1 100755 --- a/examples/sms/README.md +++ b/examples/sms/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/sms" + "go.m3o.com/sms" ) // Send an SMS. diff --git a/examples/sms/send/sendSms.go b/examples/sms/send/sendSms.go index 8609f3e..69b5a91 100755 --- a/examples/sms/send/sendSms.go +++ b/examples/sms/send/sendSms.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/sms" + "go.m3o.com/sms" ) // Send an SMS. diff --git a/examples/stock/README.md b/examples/stock/README.md index fb5a6ae..88bbec7 100755 --- a/examples/stock/README.md +++ b/examples/stock/README.md @@ -4,6 +4,60 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Stock/api](htt Endpoints: +## Price + +Get the last price for a given stock ticker + + +[https://m3o.com/stock/api#Price](https://m3o.com/stock/api#Price) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/stock" +) + +// Get the last price for a given stock ticker +func GetAstockPrice() { + stockService := stock.NewStockService(os.Getenv("M3O_API_TOKEN")) + rsp, err := stockService.Price(&stock.PriceRequest{ + Symbol: "AAPL", + + }) + fmt.Println(rsp, err) +} +``` +## 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 @@ -18,7 +72,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/stock" + "go.m3o.com/stock" ) // Get the historic open-close for a given day @@ -46,7 +100,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/stock" + "go.m3o.com/stock" ) // Get the historic order book and each trade by timestamp @@ -63,57 +117,3 @@ Stock: "AAPL", fmt.Println(rsp, err) } ``` -## Price - -Get the last price for a given stock ticker - - -[https://m3o.com/stock/api#Price](https://m3o.com/stock/api#Price) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/stock" -) - -// Get the last price for a given stock ticker -func GetAstockPrice() { - stockService := stock.NewStockService(os.Getenv("M3O_API_TOKEN")) - rsp, err := stockService.Price(&stock.PriceRequest{ - Symbol: "AAPL", - - }) - fmt.Println(rsp, err) -} -``` -## 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" - - "github.com/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) -} -``` diff --git a/examples/stock/history/getHistoricData.go b/examples/stock/history/getHistoricData.go index 2fed994..d52f76f 100755 --- a/examples/stock/history/getHistoricData.go +++ b/examples/stock/history/getHistoricData.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/stock" + "go.m3o.com/stock" ) // Get the historic open-close for a given day diff --git a/examples/stock/orderBook/orderBookHistory.go b/examples/stock/orderBook/orderBookHistory.go index 6d27a5a..4db6eee 100755 --- a/examples/stock/orderBook/orderBookHistory.go +++ b/examples/stock/orderBook/orderBookHistory.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/stock" + "go.m3o.com/stock" ) // Get the historic order book and each trade by timestamp diff --git a/examples/stock/price/getAStockPrice.go b/examples/stock/price/getAStockPrice.go index 734671f..c7f109d 100755 --- a/examples/stock/price/getAStockPrice.go +++ b/examples/stock/price/getAStockPrice.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/stock" + "go.m3o.com/stock" ) // Get the last price for a given stock ticker diff --git a/examples/stock/quote/getAStockQuote.go b/examples/stock/quote/getAStockQuote.go index 919acb3..b0e105e 100755 --- a/examples/stock/quote/getAStockQuote.go +++ b/examples/stock/quote/getAStockQuote.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/stock" + "go.m3o.com/stock" ) // Get the last quote for the stock diff --git a/examples/stream/README.md b/examples/stream/README.md index 502f372..91af5a0 100755 --- a/examples/stream/README.md +++ b/examples/stream/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/stream" + "go.m3o.com/stream" ) // Publish a message to the stream. Specify a topic to group messages for a specific topic. @@ -26,9 +26,9 @@ func PublishAmessage() { streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN")) rsp, err := streamService.Publish(&stream.PublishRequest{ Message: map[string]interface{}{ - "id": "1", "type": "signup", "user": "john", + "id": "1", }, Topic: "events", @@ -50,7 +50,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/stream" + "go.m3o.com/stream" ) // Subscribe to messages for a given topic. diff --git a/examples/stream/publish/publishAMessage.go b/examples/stream/publish/publishAMessage.go index 50e774b..95108c2 100755 --- a/examples/stream/publish/publishAMessage.go +++ b/examples/stream/publish/publishAMessage.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/stream" + "go.m3o.com/stream" ) // Publish a message to the stream. Specify a topic to group messages for a specific topic. diff --git a/examples/stream/subscribe/subscribeToATopic.go b/examples/stream/subscribe/subscribeToATopic.go index 695ccfb..97da040 100755 --- a/examples/stream/subscribe/subscribeToATopic.go +++ b/examples/stream/subscribe/subscribeToATopic.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/stream" + "go.m3o.com/stream" ) // Subscribe to messages for a given topic. diff --git a/examples/sunnah/README.md b/examples/sunnah/README.md index 58cd40b..e450b78 100755 --- a/examples/sunnah/README.md +++ b/examples/sunnah/README.md @@ -4,6 +4,63 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Sunnah/api](ht 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 +each with its own hadiths. + + +[https://m3o.com/sunnah/api#Books](https://m3o.com/sunnah/api#Books) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/sunnah" +) + +// Get a list of books from within a collection. A book can contain many chapters +// each with its own hadiths. +func GetTheBooksWithinAcollection() { + sunnahService := sunnah.NewSunnahService(os.Getenv("M3O_API_TOKEN")) + rsp, err := sunnahService.Books(&sunnah.BooksRequest{ + Collection: "bukhari", + + }) + fmt.Println(rsp, err) +} +``` ## Chapters Get all the chapters of a given book within a collection. @@ -18,7 +75,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/sunnah" + "go.m3o.com/sunnah" ) // Get all the chapters of a given book within a collection. @@ -47,7 +104,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/sunnah" + "go.m3o.com/sunnah" ) // Hadiths returns a list of hadiths and their corresponding text for a @@ -62,60 +119,3 @@ Collection: "bukhari", fmt.Println(rsp, err) } ``` -## 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" - - "github.com/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 -each with its own hadiths. - - -[https://m3o.com/sunnah/api#Books](https://m3o.com/sunnah/api#Books) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/sunnah" -) - -// Get a list of books from within a collection. A book can contain many chapters -// each with its own hadiths. -func GetTheBooksWithinAcollection() { - sunnahService := sunnah.NewSunnahService(os.Getenv("M3O_API_TOKEN")) - rsp, err := sunnahService.Books(&sunnah.BooksRequest{ - Collection: "bukhari", - - }) - fmt.Println(rsp, err) -} -``` diff --git a/examples/sunnah/books/getTheBooksWithinACollection.go b/examples/sunnah/books/getTheBooksWithinACollection.go index e10205e..cd53842 100755 --- a/examples/sunnah/books/getTheBooksWithinACollection.go +++ b/examples/sunnah/books/getTheBooksWithinACollection.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/sunnah" + "go.m3o.com/sunnah" ) // Get a list of books from within a collection. A book can contain many chapters diff --git a/examples/sunnah/chapters/listTheChaptersInABook.go b/examples/sunnah/chapters/listTheChaptersInABook.go index e72eae1..8cfe9ee 100755 --- a/examples/sunnah/chapters/listTheChaptersInABook.go +++ b/examples/sunnah/chapters/listTheChaptersInABook.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/sunnah" + "go.m3o.com/sunnah" ) // Get all the chapters of a given book within a collection. diff --git a/examples/sunnah/collections/listAvailableCollections.go b/examples/sunnah/collections/listAvailableCollections.go index 9062864..fdc1584 100755 --- a/examples/sunnah/collections/listAvailableCollections.go +++ b/examples/sunnah/collections/listAvailableCollections.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/sunnah" + "go.m3o.com/sunnah" ) // Get a list of available collections. A collection is diff --git a/examples/sunnah/hadiths/listTheHadithsInABook.go b/examples/sunnah/hadiths/listTheHadithsInABook.go index d0fac10..2537a6a 100755 --- a/examples/sunnah/hadiths/listTheHadithsInABook.go +++ b/examples/sunnah/hadiths/listTheHadithsInABook.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/sunnah" + "go.m3o.com/sunnah" ) // Hadiths returns a list of hadiths and their corresponding text for a diff --git a/examples/thumbnail/README.md b/examples/thumbnail/README.md index 122f20b..fb7f06e 100755 --- a/examples/thumbnail/README.md +++ b/examples/thumbnail/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/thumbnail" + "go.m3o.com/thumbnail" ) // Create a thumbnail screenshot by passing in a url, height and width diff --git a/examples/thumbnail/screenshot/takeScreenshotOfAUrl.go b/examples/thumbnail/screenshot/takeScreenshotOfAUrl.go index a73666c..3f028a1 100755 --- a/examples/thumbnail/screenshot/takeScreenshotOfAUrl.go +++ b/examples/thumbnail/screenshot/takeScreenshotOfAUrl.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/thumbnail" + "go.m3o.com/thumbnail" ) // Create a thumbnail screenshot by passing in a url, height and width diff --git a/examples/time/README.md b/examples/time/README.md index 3813acb..b72f4a5 100755 --- a/examples/time/README.md +++ b/examples/time/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/time" + "go.m3o.com/time" ) // Get the current time @@ -44,7 +44,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/time" + "go.m3o.com/time" ) // Get the timezone info for a specific location diff --git a/examples/time/now/returnsCurrentTimeOptionallyWithLocation.go b/examples/time/now/returnsCurrentTimeOptionallyWithLocation.go index 205d308..2777fb6 100755 --- a/examples/time/now/returnsCurrentTimeOptionallyWithLocation.go +++ b/examples/time/now/returnsCurrentTimeOptionallyWithLocation.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/time" + "go.m3o.com/time" ) // Get the current time diff --git a/examples/time/zone/getTheTimezoneInfoForASpecificLocation.go b/examples/time/zone/getTheTimezoneInfoForASpecificLocation.go index 5248639..9cfa14f 100755 --- a/examples/time/zone/getTheTimezoneInfoForASpecificLocation.go +++ b/examples/time/zone/getTheTimezoneInfoForASpecificLocation.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/time" + "go.m3o.com/time" ) // Get the timezone info for a specific location diff --git a/examples/twitter/README.md b/examples/twitter/README.md index 9243d7e..5abfe70 100755 --- a/examples/twitter/README.md +++ b/examples/twitter/README.md @@ -4,6 +4,34 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Twitter/api](h Endpoints: +## Timeline + +Get the timeline for a given user + + +[https://m3o.com/twitter/api#Timeline](https://m3o.com/twitter/api#Timeline) + +```go +package example + +import( + "fmt" + "os" + + "go.m3o.com/twitter" +) + +// Get the timeline for a given user +func GetAtwitterTimeline() { + twitterService := twitter.NewTwitterService(os.Getenv("M3O_API_TOKEN")) + rsp, err := twitterService.Timeline(&twitter.TimelineRequest{ + Limit: 1, +Username: "m3oservices", + + }) + fmt.Println(rsp, err) +} +``` ## Search Search for tweets with a simple query @@ -18,7 +46,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/twitter" + "go.m3o.com/twitter" ) // Search for tweets with a simple query @@ -45,7 +73,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/twitter" + "go.m3o.com/twitter" ) // Get the current global trending topics @@ -71,7 +99,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/twitter" + "go.m3o.com/twitter" ) // Get a user's twitter profile @@ -84,31 +112,3 @@ func GetAusersTwitterProfile() { fmt.Println(rsp, err) } ``` -## Timeline - -Get the timeline for a given user - - -[https://m3o.com/twitter/api#Timeline](https://m3o.com/twitter/api#Timeline) - -```go -package example - -import( - "fmt" - "os" - - "github.com/go.m3o.com/twitter" -) - -// Get the timeline for a given user -func GetAtwitterTimeline() { - twitterService := twitter.NewTwitterService(os.Getenv("M3O_API_TOKEN")) - rsp, err := twitterService.Timeline(&twitter.TimelineRequest{ - Limit: 1, -Username: "m3oservices", - - }) - fmt.Println(rsp, err) -} -``` diff --git a/examples/twitter/search/searchForTweets.go b/examples/twitter/search/searchForTweets.go index ac14763..41d8c72 100755 --- a/examples/twitter/search/searchForTweets.go +++ b/examples/twitter/search/searchForTweets.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/twitter" + "go.m3o.com/twitter" ) // Search for tweets with a simple query diff --git a/examples/twitter/timeline/getATwitterTimeline.go b/examples/twitter/timeline/getATwitterTimeline.go index 2af525d..3eab2c2 100755 --- a/examples/twitter/timeline/getATwitterTimeline.go +++ b/examples/twitter/timeline/getATwitterTimeline.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/twitter" + "go.m3o.com/twitter" ) // Get the timeline for a given user diff --git a/examples/twitter/trends/getTheCurrentGlobalTrendingTopics.go b/examples/twitter/trends/getTheCurrentGlobalTrendingTopics.go index 401de10..c5f6f52 100755 --- a/examples/twitter/trends/getTheCurrentGlobalTrendingTopics.go +++ b/examples/twitter/trends/getTheCurrentGlobalTrendingTopics.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/twitter" + "go.m3o.com/twitter" ) // Get the current global trending topics diff --git a/examples/twitter/user/getAUsersTwitterProfile.go b/examples/twitter/user/getAUsersTwitterProfile.go index dd5067b..3f937ef 100755 --- a/examples/twitter/user/getAUsersTwitterProfile.go +++ b/examples/twitter/user/getAUsersTwitterProfile.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/twitter" + "go.m3o.com/twitter" ) // Get a user's twitter profile diff --git a/examples/url/README.md b/examples/url/README.md index ea1c632..314e672 100755 --- a/examples/url/README.md +++ b/examples/url/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/url" + "go.m3o.com/url" ) // List information on all the shortened URLs that you have created @@ -44,7 +44,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/url" + "go.m3o.com/url" ) // Shortens a destination URL and returns a full short URL. @@ -70,7 +70,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/url" + "go.m3o.com/url" ) // Proxy returns the destination URL of a short URL. diff --git a/examples/url/list/listYourShortenedUrls.go b/examples/url/list/listYourShortenedUrls.go index f595cd5..02c81ba 100755 --- a/examples/url/list/listYourShortenedUrls.go +++ b/examples/url/list/listYourShortenedUrls.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/url" + "go.m3o.com/url" ) // List information on all the shortened URLs that you have created diff --git a/examples/url/proxy/resolveAShortUrlToALongDestinationUrl.go b/examples/url/proxy/resolveAShortUrlToALongDestinationUrl.go index a475152..c1e439a 100755 --- a/examples/url/proxy/resolveAShortUrlToALongDestinationUrl.go +++ b/examples/url/proxy/resolveAShortUrlToALongDestinationUrl.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/url" + "go.m3o.com/url" ) // Proxy returns the destination URL of a short URL. diff --git a/examples/url/shorten/shortenALongUrl.go b/examples/url/shorten/shortenALongUrl.go index f0577ab..f05badc 100755 --- a/examples/url/shorten/shortenALongUrl.go +++ b/examples/url/shorten/shortenALongUrl.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/url" + "go.m3o.com/url" ) // Shortens a destination URL and returns a full short URL. diff --git a/examples/user/README.md b/examples/user/README.md index 87818d9..7ecf734 100755 --- a/examples/user/README.md +++ b/examples/user/README.md @@ -4,12 +4,12 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/User/api](http Endpoints: -## Delete +## Create -Delete an account by id +Create a new user account. The email address and username for the account must be unique. -[https://m3o.com/user/api#Delete](https://m3o.com/user/api#Delete) +[https://m3o.com/user/api#Create](https://m3o.com/user/api#Create) ```go package example @@ -18,68 +18,17 @@ import( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) -// Delete an account by id -func DeleteUserAccount() { +// 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.Delete(&user.DeleteRequest{ - Id: "fdf34f34f34-f34f34-f43f43f34-f4f34f", - - }) - 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" - - "github.com/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: "sds34s34s34-s34s34-s43s43s34-s4s34s", - - }) - 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" - - "github.com/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: "sds34s34s34-s34s34-s43s43s34-s4s34s", + rsp, err := userService.Create(&user.CreateRequest{ + Email: "joe@example.com", +Id: "usrid-1", +Password: "mySecretPass123", +Username: "usrname-1", }) fmt.Println(rsp, err) @@ -99,7 +48,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Update the account username or email @@ -113,35 +62,6 @@ Id: "usrid-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" - - "github.com/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: "myEvenMoreSecretPass123", -NewPassword: "myEvenMoreSecretPass123", -OldPassword: "mySecretPass123", - - }) - fmt.Println(rsp, err) -} -``` ## Read Read an account by id, username or email. Only one need to be specified. @@ -156,7 +76,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Read an account by id, username or email. Only one need to be specified. @@ -183,7 +103,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Read an account by id, username or email. Only one need to be specified. @@ -210,7 +130,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Read an account by id, username or email. Only one need to be specified. @@ -223,6 +143,33 @@ 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: "fdf34f34f34-f34f34-f43f43f34-f4f34f", + + }) + fmt.Println(rsp, err) +} +``` ## Login Login using username or email. The response will return a new session for successful login, @@ -238,7 +185,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Login using username or email. The response will return a new session for successful login, @@ -253,12 +200,12 @@ Password: "mySecretPass123", fmt.Println(rsp, err) } ``` -## Create +## Logout -Create a new user account. The email address and username for the account must be unique. +Logout a user account -[https://m3o.com/user/api#Create](https://m3o.com/user/api#Create) +[https://m3o.com/user/api#Logout](https://m3o.com/user/api#Logout) ```go package example @@ -267,17 +214,70 @@ import( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) -// Create a new user account. The email address and username for the account must be unique. -func CreateAnAccount() { +// Logout a user account +func LogAuserOut() { userService := user.NewUserService(os.Getenv("M3O_API_TOKEN")) - rsp, err := userService.Create(&user.CreateRequest{ - Email: "joe@example.com", -Id: "usrid-1", -Password: "mySecretPass123", -Username: "usrname-1", + rsp, err := userService.Logout(&user.LogoutRequest{ + SessionId: "sds34s34s34-s34s34-s43s43s34-s4s34s", + + }) + 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: "sds34s34s34-s34s34-s43s43s34-s4s34s", + + }) + 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: "myEvenMoreSecretPass123", +NewPassword: "myEvenMoreSecretPass123", +OldPassword: "mySecretPass123", }) fmt.Println(rsp, err) @@ -303,7 +303,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Send a verification email @@ -343,7 +343,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Verify the email address of an account from a token sent in an email to the user. diff --git a/examples/user/create/createAnAccount.go b/examples/user/create/createAnAccount.go index f37fcaa..1adf034 100755 --- a/examples/user/create/createAnAccount.go +++ b/examples/user/create/createAnAccount.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Create a new user account. The email address and username for the account must be unique. diff --git a/examples/user/delete/deleteUserAccount.go b/examples/user/delete/deleteUserAccount.go index bd04441..bd5e053 100755 --- a/examples/user/delete/deleteUserAccount.go +++ b/examples/user/delete/deleteUserAccount.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Delete an account by id diff --git a/examples/user/login/logAUserIn.go b/examples/user/login/logAUserIn.go index 15fd9bc..eea89ba 100755 --- a/examples/user/login/logAUserIn.go +++ b/examples/user/login/logAUserIn.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Login using username or email. The response will return a new session for successful login, diff --git a/examples/user/logout/logAUserOut.go b/examples/user/logout/logAUserOut.go index 409aa8c..58df198 100755 --- a/examples/user/logout/logAUserOut.go +++ b/examples/user/logout/logAUserOut.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Logout a user account diff --git a/examples/user/read/readAccountByEmail.go b/examples/user/read/readAccountByEmail.go index daef3a2..1e559f8 100755 --- a/examples/user/read/readAccountByEmail.go +++ b/examples/user/read/readAccountByEmail.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Read an account by id, username or email. Only one need to be specified. diff --git a/examples/user/read/readAccountByUsernameOrEmail.go b/examples/user/read/readAccountByUsernameOrEmail.go index 6cd3a13..756d7db 100755 --- a/examples/user/read/readAccountByUsernameOrEmail.go +++ b/examples/user/read/readAccountByUsernameOrEmail.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Read an account by id, username or email. Only one need to be specified. diff --git a/examples/user/read/readAnAccountById.go b/examples/user/read/readAnAccountById.go index cd67096..dbc0480 100755 --- a/examples/user/read/readAnAccountById.go +++ b/examples/user/read/readAnAccountById.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Read an account by id, username or email. Only one need to be specified. diff --git a/examples/user/readSession/readASessionByTheSessionId.go b/examples/user/readSession/readASessionByTheSessionId.go index 547f0fc..8e558d8 100755 --- a/examples/user/readSession/readASessionByTheSessionId.go +++ b/examples/user/readSession/readASessionByTheSessionId.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "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. diff --git a/examples/user/sendVerificationEmail/sendVerificationEmail.go b/examples/user/sendVerificationEmail/sendVerificationEmail.go index 0bd1c66..c2312ef 100755 --- a/examples/user/sendVerificationEmail/sendVerificationEmail.go +++ b/examples/user/sendVerificationEmail/sendVerificationEmail.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Send a verification email diff --git a/examples/user/update/updateAnAccount.go b/examples/user/update/updateAnAccount.go index a355ef3..1d77a3c 100755 --- a/examples/user/update/updateAnAccount.go +++ b/examples/user/update/updateAnAccount.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Update the account username or email diff --git a/examples/user/updatePassword/updateTheAccountPassword.go b/examples/user/updatePassword/updateTheAccountPassword.go index 6f002c0..6436969 100755 --- a/examples/user/updatePassword/updateTheAccountPassword.go +++ b/examples/user/updatePassword/updateTheAccountPassword.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Update the account password diff --git a/examples/user/verifyEmail/verifyEmail.go b/examples/user/verifyEmail/verifyEmail.go index ac42870..b55e4e5 100755 --- a/examples/user/verifyEmail/verifyEmail.go +++ b/examples/user/verifyEmail/verifyEmail.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/user" + "go.m3o.com/user" ) // Verify the email address of an account from a token sent in an email to the user. diff --git a/examples/vehicle/README.md b/examples/vehicle/README.md index 8d83ec3..ed48549 100755 --- a/examples/vehicle/README.md +++ b/examples/vehicle/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/vehicle" + "go.m3o.com/vehicle" ) // Lookup a UK vehicle by it's registration number diff --git a/examples/vehicle/lookup/lookupVehicle.go b/examples/vehicle/lookup/lookupVehicle.go index 3d15ec2..03768ba 100755 --- a/examples/vehicle/lookup/lookupVehicle.go +++ b/examples/vehicle/lookup/lookupVehicle.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/vehicle" + "go.m3o.com/vehicle" ) // Lookup a UK vehicle by it's registration number diff --git a/examples/weather/README.md b/examples/weather/README.md index eb7d869..adce8de 100755 --- a/examples/weather/README.md +++ b/examples/weather/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/weather" + "go.m3o.com/weather" ) // Get the current weather report for a location by postcode, city, zip code, ip address @@ -45,7 +45,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/weather" + "go.m3o.com/weather" ) // Get the weather forecast for the next 1-10 days diff --git a/examples/weather/forecast/forecastWeather.go b/examples/weather/forecast/forecastWeather.go index 5cb3320..48fe8ec 100755 --- a/examples/weather/forecast/forecastWeather.go +++ b/examples/weather/forecast/forecastWeather.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/weather" + "go.m3o.com/weather" ) // Get the weather forecast for the next 1-10 days diff --git a/examples/weather/now/getCurrentWeather.go b/examples/weather/now/getCurrentWeather.go index 469e121..ae904c2 100755 --- a/examples/weather/now/getCurrentWeather.go +++ b/examples/weather/now/getCurrentWeather.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/weather" + "go.m3o.com/weather" ) // Get the current weather report for a location by postcode, city, zip code, ip address diff --git a/examples/youtube/README.md b/examples/youtube/README.md index 6fe1bfb..edb5c83 100755 --- a/examples/youtube/README.md +++ b/examples/youtube/README.md @@ -18,7 +18,7 @@ import( "fmt" "os" - "github.com/go.m3o.com/youtube" + "go.m3o.com/youtube" ) // Search for videos on YouTube diff --git a/examples/youtube/search/searchForVideos.go b/examples/youtube/search/searchForVideos.go index ce7e839..11f2b6b 100755 --- a/examples/youtube/search/searchForVideos.go +++ b/examples/youtube/search/searchForVideos.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/go.m3o.com/youtube" + "go.m3o.com/youtube" ) // Search for videos on YouTube diff --git a/file/file.go b/file/file.go index dbf8caf..c0da688 100755 --- a/file/file.go +++ b/file/file.go @@ -1,7 +1,7 @@ package file import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewFileService(token string) *FileService { diff --git a/forex/forex.go b/forex/forex.go index d4f2fe5..8fcb80e 100755 --- a/forex/forex.go +++ b/forex/forex.go @@ -1,7 +1,7 @@ package forex import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewForexService(token string) *ForexService { diff --git a/function/function.go b/function/function.go index 9c3ddc2..502e64f 100755 --- a/function/function.go +++ b/function/function.go @@ -1,7 +1,7 @@ package function import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewFunctionService(token string) *FunctionService { diff --git a/geocoding/geocoding.go b/geocoding/geocoding.go index d569b7f..a01a173 100755 --- a/geocoding/geocoding.go +++ b/geocoding/geocoding.go @@ -1,7 +1,7 @@ package geocoding import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewGeocodingService(token string) *GeocodingService { diff --git a/gifs/gifs.go b/gifs/gifs.go index b669f34..c761446 100755 --- a/gifs/gifs.go +++ b/gifs/gifs.go @@ -1,7 +1,7 @@ package gifs import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewGifsService(token string) *GifsService { diff --git a/google/google.go b/google/google.go index 6c05839..985462f 100755 --- a/google/google.go +++ b/google/google.go @@ -1,7 +1,7 @@ package google import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewGoogleService(token string) *GoogleService { diff --git a/helloworld/helloworld.go b/helloworld/helloworld.go index 075fd71..e7bcf38 100755 --- a/helloworld/helloworld.go +++ b/helloworld/helloworld.go @@ -1,7 +1,7 @@ package helloworld import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewHelloworldService(token string) *HelloworldService { diff --git a/holidays/holidays.go b/holidays/holidays.go index db338a7..71b1058 100755 --- a/holidays/holidays.go +++ b/holidays/holidays.go @@ -1,7 +1,7 @@ package holidays import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewHolidaysService(token string) *HolidaysService { diff --git a/id/id.go b/id/id.go index f3d5638..d26ea72 100755 --- a/id/id.go +++ b/id/id.go @@ -1,7 +1,7 @@ package id import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewIdService(token string) *IdService { diff --git a/image/image.go b/image/image.go index 0eb604d..70800b1 100755 --- a/image/image.go +++ b/image/image.go @@ -1,7 +1,7 @@ package image import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewImageService(token string) *ImageService { diff --git a/ip/ip.go b/ip/ip.go index 3d81955..8213744 100755 --- a/ip/ip.go +++ b/ip/ip.go @@ -1,7 +1,7 @@ package ip import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewIpService(token string) *IpService { diff --git a/location/location.go b/location/location.go index 1acca4d..2817790 100755 --- a/location/location.go +++ b/location/location.go @@ -1,7 +1,7 @@ package location import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewLocationService(token string) *LocationService { diff --git a/m3o.go b/m3o.go index 129114d..b4ddb38 100755 --- a/m3o.go +++ b/m3o.go @@ -1,48 +1,48 @@ package m3o import ( - "github.com/m3o/m3o-go/address" - "github.com/m3o/m3o-go/answer" - "github.com/m3o/m3o-go/cache" - "github.com/m3o/m3o-go/crypto" - "github.com/m3o/m3o-go/currency" - "github.com/m3o/m3o-go/db" - "github.com/m3o/m3o-go/email" - "github.com/m3o/m3o-go/emoji" - "github.com/m3o/m3o-go/evchargers" - "github.com/m3o/m3o-go/file" - "github.com/m3o/m3o-go/forex" - "github.com/m3o/m3o-go/function" - "github.com/m3o/m3o-go/geocoding" - "github.com/m3o/m3o-go/gifs" - "github.com/m3o/m3o-go/google" - "github.com/m3o/m3o-go/helloworld" - "github.com/m3o/m3o-go/holidays" - "github.com/m3o/m3o-go/id" - "github.com/m3o/m3o-go/image" - "github.com/m3o/m3o-go/ip" - "github.com/m3o/m3o-go/location" - "github.com/m3o/m3o-go/notes" - "github.com/m3o/m3o-go/otp" - "github.com/m3o/m3o-go/postcode" - "github.com/m3o/m3o-go/prayer" - "github.com/m3o/m3o-go/qr" - "github.com/m3o/m3o-go/quran" - "github.com/m3o/m3o-go/routing" - "github.com/m3o/m3o-go/rss" - "github.com/m3o/m3o-go/sentiment" - "github.com/m3o/m3o-go/sms" - "github.com/m3o/m3o-go/stock" - "github.com/m3o/m3o-go/stream" - "github.com/m3o/m3o-go/sunnah" - "github.com/m3o/m3o-go/thumbnail" - "github.com/m3o/m3o-go/time" - "github.com/m3o/m3o-go/twitter" - "github.com/m3o/m3o-go/url" - "github.com/m3o/m3o-go/user" - "github.com/m3o/m3o-go/vehicle" - "github.com/m3o/m3o-go/weather" - "github.com/m3o/m3o-go/youtube" + "go.m3o.com/address" + "go.m3o.com/answer" + "go.m3o.com/cache" + "go.m3o.com/crypto" + "go.m3o.com/currency" + "go.m3o.com/db" + "go.m3o.com/email" + "go.m3o.com/emoji" + "go.m3o.com/evchargers" + "go.m3o.com/file" + "go.m3o.com/forex" + "go.m3o.com/function" + "go.m3o.com/geocoding" + "go.m3o.com/gifs" + "go.m3o.com/google" + "go.m3o.com/helloworld" + "go.m3o.com/holidays" + "go.m3o.com/id" + "go.m3o.com/image" + "go.m3o.com/ip" + "go.m3o.com/location" + "go.m3o.com/notes" + "go.m3o.com/otp" + "go.m3o.com/postcode" + "go.m3o.com/prayer" + "go.m3o.com/qr" + "go.m3o.com/quran" + "go.m3o.com/routing" + "go.m3o.com/rss" + "go.m3o.com/sentiment" + "go.m3o.com/sms" + "go.m3o.com/stock" + "go.m3o.com/stream" + "go.m3o.com/sunnah" + "go.m3o.com/thumbnail" + "go.m3o.com/time" + "go.m3o.com/twitter" + "go.m3o.com/url" + "go.m3o.com/user" + "go.m3o.com/vehicle" + "go.m3o.com/weather" + "go.m3o.com/youtube" ) func NewClient(token string) *Client { diff --git a/notes/notes.go b/notes/notes.go index 4c29b8b..a1df005 100755 --- a/notes/notes.go +++ b/notes/notes.go @@ -1,7 +1,7 @@ package notes import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewNotesService(token string) *NotesService { diff --git a/otp/otp.go b/otp/otp.go index 5cc952f..109b379 100755 --- a/otp/otp.go +++ b/otp/otp.go @@ -1,7 +1,7 @@ package otp import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewOtpService(token string) *OtpService { diff --git a/postcode/postcode.go b/postcode/postcode.go index 818f64b..4419b85 100755 --- a/postcode/postcode.go +++ b/postcode/postcode.go @@ -1,7 +1,7 @@ package postcode import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewPostcodeService(token string) *PostcodeService { diff --git a/prayer/prayer.go b/prayer/prayer.go index cfafcc7..9a3eba6 100755 --- a/prayer/prayer.go +++ b/prayer/prayer.go @@ -1,7 +1,7 @@ package prayer import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewPrayerService(token string) *PrayerService { diff --git a/qr/qr.go b/qr/qr.go index b0e4a34..17db08b 100755 --- a/qr/qr.go +++ b/qr/qr.go @@ -1,7 +1,7 @@ package qr import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewQrService(token string) *QrService { diff --git a/quran/quran.go b/quran/quran.go index 3fc090d..cac5927 100755 --- a/quran/quran.go +++ b/quran/quran.go @@ -1,7 +1,7 @@ package quran import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewQuranService(token string) *QuranService { diff --git a/routing/routing.go b/routing/routing.go index 4ac2d5b..43471ff 100755 --- a/routing/routing.go +++ b/routing/routing.go @@ -1,7 +1,7 @@ package routing import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewRoutingService(token string) *RoutingService { diff --git a/rss/rss.go b/rss/rss.go index 9348dc6..1e3f0b4 100755 --- a/rss/rss.go +++ b/rss/rss.go @@ -1,7 +1,7 @@ package rss import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewRssService(token string) *RssService { diff --git a/sentiment/sentiment.go b/sentiment/sentiment.go index f53278f..c7ed2e3 100755 --- a/sentiment/sentiment.go +++ b/sentiment/sentiment.go @@ -1,7 +1,7 @@ package sentiment import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewSentimentService(token string) *SentimentService { diff --git a/sms/sms.go b/sms/sms.go index 8ae4f5f..c947bd4 100755 --- a/sms/sms.go +++ b/sms/sms.go @@ -1,7 +1,7 @@ package sms import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewSmsService(token string) *SmsService { diff --git a/stock/stock.go b/stock/stock.go index 002ddf5..4bb6fa8 100755 --- a/stock/stock.go +++ b/stock/stock.go @@ -1,7 +1,7 @@ package stock import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewStockService(token string) *StockService { diff --git a/stream/stream.go b/stream/stream.go index 6467965..0e3d441 100755 --- a/stream/stream.go +++ b/stream/stream.go @@ -1,7 +1,7 @@ package stream import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewStreamService(token string) *StreamService { diff --git a/sunnah/sunnah.go b/sunnah/sunnah.go index 4375cfc..a7276b0 100755 --- a/sunnah/sunnah.go +++ b/sunnah/sunnah.go @@ -1,7 +1,7 @@ package sunnah import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewSunnahService(token string) *SunnahService { diff --git a/thumbnail/thumbnail.go b/thumbnail/thumbnail.go index cb33147..968aa87 100755 --- a/thumbnail/thumbnail.go +++ b/thumbnail/thumbnail.go @@ -1,7 +1,7 @@ package thumbnail import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewThumbnailService(token string) *ThumbnailService { diff --git a/time/time.go b/time/time.go index aa61e65..db652c3 100755 --- a/time/time.go +++ b/time/time.go @@ -1,7 +1,7 @@ package time import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewTimeService(token string) *TimeService { diff --git a/twitter/twitter.go b/twitter/twitter.go index a855bfe..1a94e3d 100755 --- a/twitter/twitter.go +++ b/twitter/twitter.go @@ -1,7 +1,7 @@ package twitter import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewTwitterService(token string) *TwitterService { diff --git a/url/url.go b/url/url.go index cb3b79a..12bb178 100755 --- a/url/url.go +++ b/url/url.go @@ -1,7 +1,7 @@ package url import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewUrlService(token string) *UrlService { diff --git a/user/user.go b/user/user.go index b8d3a5f..6a4ce49 100755 --- a/user/user.go +++ b/user/user.go @@ -1,7 +1,7 @@ package user import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewUserService(token string) *UserService { diff --git a/vehicle/vehicle.go b/vehicle/vehicle.go index a82da4c..6e05260 100755 --- a/vehicle/vehicle.go +++ b/vehicle/vehicle.go @@ -1,7 +1,7 @@ package vehicle import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewVehicleService(token string) *VehicleService { diff --git a/weather/weather.go b/weather/weather.go index 578297a..1704993 100755 --- a/weather/weather.go +++ b/weather/weather.go @@ -1,7 +1,7 @@ package weather import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewWeatherService(token string) *WeatherService { diff --git a/youtube/youtube.go b/youtube/youtube.go index bda38af..b2cec9a 100755 --- a/youtube/youtube.go +++ b/youtube/youtube.go @@ -1,7 +1,7 @@ package youtube import ( - "github.com/m3o/m3o-go/client" + "go.m3o.com/client" ) func NewYoutubeService(token string) *YoutubeService {