Skip to content

m3o/m3o

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
api
.
March 14, 2023 17:54
March 20, 2023 22:03
October 27, 2022 15:53
cmd
January 16, 2023 10:28
December 26, 2022 13:56
February 19, 2022 15:11
October 19, 2022 13:36
January 19, 2022 18:11
December 20, 2022 13:36
March 23, 2023 10:37
November 2, 2022 11:07
November 2, 2022 11:07

M3O License

Serverless Micro services gateway

Overview

M3O transforms public APIs into smaller easier to use Micro services which you can explore, discover and consume as serverless building blocks. The platform generates unified api docs, client libraries and examples on top of Micro Services using protobuf to OpenAPI conversion and some custom tooling.

Features

Here are the main features:

  • 1️⃣ ONE Platform - Discover, explore and consume public APIs all in one place.
  • ☝️ ONE Account - Manage your API usage with one account and one token.
  • ONE Framework - Learn, develop and integrate using one set of docs and libraries.

Services

Here are some of the APIs:

  • AI - GPT powered by OpenAI
  • Cache - Fast access key-value storage
  • DB - Serverless postgres DB
  • SMS - Send an SMS message
  • Email - Send emails in a flash
  • Geocoding - Address lookup and reverse resolution

See the full list at m3o.com/explore.

Getting Started

  • Head to m3o.com and signup for a free account.
  • Browse services on the Explore page.
  • Call any service using your token in the Authorization: Bearer [Token] header
  • All services are available through one API endpoint: https://api.m3o.com/v1/*.
  • Use m3o-cli, m3o-js and m3o-go clients for development

Quick Start

Grab your API token from the dashboard and export it

export M3O_API_TOKEN=xxxxxxx

Curl

curl \
  -H "Authorization: Bearer $M3O_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"days": 2, "location": "London"}' \
  https://api.m3o.com/v1/weather/Forecast

Find all the curl examples in m3o-sh

Go

Import packages from go.m3o.com

import (
        "go.m3o.com"
        "go.m3o.com/weather"
)

Create a new client with your API token and call it

client := m3o.New(os.Getenv("M3O_API_TOKEN"))
rsp, err := client.Weather.Forecast(&weather.ForecastRequest{
	Days:     2,
	Location: "London",
})
fmt.Println(rsp, err)

Find all the Go examples in m3o-go

JS

Install the m3o package

npm install m3o

Call app run like so

const m3o = require("m3o").default(process.env.M3O_API_TOKEN);

async function main() {
  let rsp = await m3o.weather.forecast({
    days: 2,
    location: "London",
  });
  console.log(rsp);
}

main();

Find more JS examples in m3o-js

CLI

Install the cli

curl -fssl https://install.m3o.com/cli | /bin/bash

Example call

m3o weather forecast --location=London --days=2

See the m3o-cli for examples

Deployment

  1. See Cloud for Infrastructure deployment
  2. See API for Backend deployment
  3. See Apps for Web deployment

Development

APIs are developed using the Micro platform.