mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
Commit from GitHub Actions (Publish APIs & Clients)
This commit is contained in:
@@ -74,5 +74,5 @@
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"types": "index.d.ts",
|
||||
"version": "1.0.558"
|
||||
"version": "1.0.559"
|
||||
}
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/address"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/address"
|
||||
)
|
||||
|
||||
// Lookup a list of UK addresses by postcode
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/answer"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/answer"
|
||||
)
|
||||
|
||||
// Ask a question and receive an instant answer
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
)
|
||||
|
||||
// Decrement a value (if it's a number)
|
||||
|
||||
3
examples/cache/delete/go/deleteAValue.go
vendored
3
examples/cache/delete/go/deleteAValue.go
vendored
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
)
|
||||
|
||||
// Delete a value from the cache
|
||||
|
||||
3
examples/cache/get/go/getAValue.go
vendored
3
examples/cache/get/go/getAValue.go
vendored
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
)
|
||||
|
||||
// Get an item from the cache by key
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
)
|
||||
|
||||
// Increment a value (if it's a number)
|
||||
|
||||
3
examples/cache/set/go/setAValue.go
vendored
3
examples/cache/set/go/setAValue.go
vendored
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/cache"
|
||||
)
|
||||
|
||||
// Set an item in the cache. Overwrites any existing value already set.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/crypto"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/crypto"
|
||||
)
|
||||
|
||||
// Returns the history for the previous close
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/crypto"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/crypto"
|
||||
)
|
||||
|
||||
// Get news related to a currency
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/crypto"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/crypto"
|
||||
)
|
||||
|
||||
// Get the last price for a given crypto ticker
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/crypto"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/crypto"
|
||||
)
|
||||
|
||||
// Get the last quote for a given crypto ticker
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
)
|
||||
|
||||
// Codes returns the supported currency codes for the API
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
)
|
||||
|
||||
// Convert returns the currency conversion rate between two pairs e.g USD/GBP
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
)
|
||||
|
||||
// Convert returns the currency conversion rate between two pairs e.g USD/GBP
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
)
|
||||
|
||||
// Returns the historic rates for a currency on a given date
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/currency"
|
||||
)
|
||||
|
||||
// Rates returns the currency rates for a given code e.g USD
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/db"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/db"
|
||||
)
|
||||
|
||||
// Count records in a table
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/db"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/db"
|
||||
)
|
||||
|
||||
// Create a record in the database. Optionally include an "id" field otherwise it's set automatically.
|
||||
@@ -11,10 +12,10 @@ func CreateArecord() {
|
||||
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := dbService.Create(&db.CreateRequest{
|
||||
Record: map[string]interface{}{
|
||||
"name": "Jane",
|
||||
"age": 42,
|
||||
"isActive": true,
|
||||
"id": "1",
|
||||
"name": "Jane",
|
||||
},
|
||||
Table: "users",
|
||||
})
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/db"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/db"
|
||||
)
|
||||
|
||||
// Delete a record in the database by id.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/db"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/db"
|
||||
)
|
||||
|
||||
// Read data from a table. Lookup can be by ID or via querying any field in the record.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/db"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/db"
|
||||
)
|
||||
|
||||
// Truncate the records in a table
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/db"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/db"
|
||||
)
|
||||
|
||||
// Update a record in the database. Include an "id" in the record to update.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/email"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/email"
|
||||
)
|
||||
|
||||
// Send an email by passing in from, to, subject, and a text or html body
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/emoji"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/emoji"
|
||||
)
|
||||
|
||||
// Find an emoji by its alias e.g :beer:
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/emoji"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/emoji"
|
||||
)
|
||||
|
||||
// Get the flag for a country. Requires country code e.g GB for great britain
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/emoji"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/emoji"
|
||||
)
|
||||
|
||||
// Print text and renders the emojis with aliases e.g
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/emoji"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/emoji"
|
||||
)
|
||||
|
||||
// Send an emoji to anyone via SMS. Messages are sent in the form '<message> Sent from <from>'
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/evchargers"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/evchargers"
|
||||
)
|
||||
|
||||
// Retrieve reference data as used by this API and in conjunction with the Search endpoint
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/evchargers"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/evchargers"
|
||||
)
|
||||
|
||||
// Search by giving a coordinate and a max distance, or bounding box and optional filters
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/evchargers"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/evchargers"
|
||||
)
|
||||
|
||||
// Search by giving a coordinate and a max distance, or bounding box and optional filters
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/evchargers"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/evchargers"
|
||||
)
|
||||
|
||||
// Search by giving a coordinate and a max distance, or bounding box and optional filters
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/file"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/file"
|
||||
)
|
||||
|
||||
// Delete a file by project name/path
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/file"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/file"
|
||||
)
|
||||
|
||||
// List files by their project and optionally a path.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/file"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/file"
|
||||
)
|
||||
|
||||
// Read a file by path
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/file"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/file"
|
||||
)
|
||||
|
||||
// Save a file
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/forex"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/forex"
|
||||
)
|
||||
|
||||
// Returns the data for the previous close
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/forex"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/forex"
|
||||
)
|
||||
|
||||
// Get the latest price for a given forex ticker
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/forex"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/forex"
|
||||
)
|
||||
|
||||
// Get the latest quote for the forex
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/function"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/function"
|
||||
)
|
||||
|
||||
// Call a function by name
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/function"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/function"
|
||||
)
|
||||
|
||||
// Delete a function by name
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/function"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/function"
|
||||
)
|
||||
|
||||
// Deploy a group of functions
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/function"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/function"
|
||||
)
|
||||
|
||||
//
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/function"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/function"
|
||||
)
|
||||
|
||||
// List all the deployed functions
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/geocoding"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/geocoding"
|
||||
)
|
||||
|
||||
// Lookup returns a geocoded address including normalized address and gps coordinates. All fields are optional, provide more to get more accurate results
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/geocoding"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/geocoding"
|
||||
)
|
||||
|
||||
// Reverse lookup an address from gps coordinates
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/helloworld"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/helloworld"
|
||||
)
|
||||
|
||||
// Call returns a personalised "Hello $name" response
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/helloworld"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/helloworld"
|
||||
)
|
||||
|
||||
// Stream returns a stream of "Hello $name" responses
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/holidays"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/holidays"
|
||||
)
|
||||
|
||||
// Get the list of countries that are supported by this API
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/holidays"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/holidays"
|
||||
)
|
||||
|
||||
// List the holiday dates for a given country and year
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/id"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/id"
|
||||
)
|
||||
|
||||
// Generate a unique ID. Defaults to uuid.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/id"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/id"
|
||||
)
|
||||
|
||||
// Generate a unique ID. Defaults to uuid.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/id"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/id"
|
||||
)
|
||||
|
||||
// Generate a unique ID. Defaults to uuid.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/id"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/id"
|
||||
)
|
||||
|
||||
// Generate a unique ID. Defaults to uuid.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/id"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/id"
|
||||
)
|
||||
|
||||
// List the types of IDs available. No query params needed.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/image"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/image"
|
||||
)
|
||||
|
||||
// Convert an image from one format (jpeg, png etc.) to an other either on the fly (from base64 to base64),
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/image"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/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.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/image"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/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.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/image"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/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.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/image"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/image"
|
||||
)
|
||||
|
||||
// Upload an image by either sending a base64 encoded image to this endpoint or a URL.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/image"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/image"
|
||||
)
|
||||
|
||||
// Upload an image by either sending a base64 encoded image to this endpoint or a URL.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/ip"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/ip"
|
||||
)
|
||||
|
||||
// Lookup the geolocation information for an IP address
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/location"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/location"
|
||||
)
|
||||
|
||||
// Read an entity by its ID
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/location"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/location"
|
||||
)
|
||||
|
||||
// Save an entity's current position
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/location"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/location"
|
||||
)
|
||||
|
||||
// Search for entities in a given radius
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
)
|
||||
|
||||
// Create a new note
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
)
|
||||
|
||||
// Delete a note
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
)
|
||||
|
||||
// List all the notes
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
)
|
||||
|
||||
// Read a note
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/notes"
|
||||
)
|
||||
|
||||
// Update a note
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/otp"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/otp"
|
||||
)
|
||||
|
||||
// Generate an OTP (one time pass) code
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/otp"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/otp"
|
||||
)
|
||||
|
||||
// Validate the OTP code
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/postcode"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/postcode"
|
||||
)
|
||||
|
||||
// Lookup a postcode to retrieve the related region, county, etc
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/postcode"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/postcode"
|
||||
)
|
||||
|
||||
// Return a random postcode and its related info
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/postcode"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/postcode"
|
||||
)
|
||||
|
||||
// Validate a postcode.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/prayer"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/prayer"
|
||||
)
|
||||
|
||||
// Get the prayer (salah) times for a location on a given date
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/qr"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/qr"
|
||||
)
|
||||
|
||||
// Generate a QR code with a specific text and size
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/quran"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/quran"
|
||||
)
|
||||
|
||||
// List the Chapters (surahs) of the Quran
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/quran"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/quran"
|
||||
)
|
||||
|
||||
// Search the Quran for any form of query or questions
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/quran"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/quran"
|
||||
)
|
||||
|
||||
// Get a summary for a given chapter (surah)
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/quran"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/quran"
|
||||
)
|
||||
|
||||
// Lookup the verses (ayahs) for a chapter including
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/routing"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/routing"
|
||||
)
|
||||
|
||||
// Turn by turn directions from a start point to an end point including maneuvers and bearings
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/routing"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/routing"
|
||||
)
|
||||
|
||||
// Get the eta for a route from origin to destination. The eta is an estimated time based on car routes
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/routing"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/routing"
|
||||
)
|
||||
|
||||
// Retrieve a route as a simple list of gps points along with total distance and estimated duration
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
)
|
||||
|
||||
// Add a new RSS feed with a name, url, and category
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
)
|
||||
|
||||
// Get an RSS feed by name. If no name is given, all feeds are returned. Default limit is 25 entries.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
)
|
||||
|
||||
// List the saved RSS fields
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
)
|
||||
|
||||
// Remove an RSS feed by name
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/sentiment"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/sentiment"
|
||||
)
|
||||
|
||||
// Analyze and score a piece of text
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/sms"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/sms"
|
||||
)
|
||||
|
||||
// Send an SMS.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/stock"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/stock"
|
||||
)
|
||||
|
||||
// Get the historic open-close for a given day
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/stock"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/stock"
|
||||
)
|
||||
|
||||
// Get the historic order book and each trade by timestamp
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/stock"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/stock"
|
||||
)
|
||||
|
||||
// Get the last price for a given stock ticker
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/stock"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/stock"
|
||||
)
|
||||
|
||||
// Get the last quote for the stock
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/stream"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/stream"
|
||||
)
|
||||
|
||||
// Publish a message to the stream. Specify a topic to group messages for a specific topic.
|
||||
@@ -11,9 +12,9 @@ func PublishAmessage() {
|
||||
streamService := stream.NewStreamService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := streamService.Publish(&stream.PublishRequest{
|
||||
Message: map[string]interface{}{
|
||||
"id": "1",
|
||||
"type": "signup",
|
||||
"user": "john",
|
||||
"id": "1",
|
||||
},
|
||||
Topic: "events",
|
||||
})
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/stream"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/stream"
|
||||
)
|
||||
|
||||
// Subscribe to messages for a given topic.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/sunnah"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/sunnah"
|
||||
)
|
||||
|
||||
// Get a list of books from within a collection. A book can contain many chapters
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/sunnah"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/sunnah"
|
||||
)
|
||||
|
||||
// Get all the chapters of a given book within a collection.
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/sunnah"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/sunnah"
|
||||
)
|
||||
|
||||
// Get a list of available collections. A collection is
|
||||
|
||||
@@ -2,8 +2,9 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/sunnah"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/sunnah"
|
||||
)
|
||||
|
||||
// Hadiths returns a list of hadiths and their corresponding text for a
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user