Code Monkey home page Code Monkey logo

connector-pokefusion's Introduction

Example: Pokefusion Connector API

Welcome to the Pokefusion Connector API Example! We'll use this repository as a basic template for creating new Connector APIs, or APIs that appear as a part of the Build on Standard Library user interface. As an example, once complete and shipped to production, your API will appear in the actions list.

Which we can use to build things like Slack workflows that produce output like:

This README

This is the README for you API. It is intended to guide other developers on internal implementation of your code, like how to set up a workflow project or connector API. It will not be displayed in your Standard Library documentation.

You can include an Deploy to Build on Standard Library button for GitHub, as displayed above.

About this API

This Pokefusion Connector API is a basic example of how to set up a Connector API using Build on Standard Library. You can use this template to deploy a basic Pokefusion API to your personal Standard Library account, which can then be used as a part of the Build on Standard Library interface on build.stdlib.com.

This sample API has one endpoint, __main__.js which accepts two parameters, headPokemon and bodyPokemon for generating random fused Pokemon based on pokemon.alexonsager.net.

Deploying this Connector API

You can deploy this API instantly using the Deploy on Standard Library button:

From here, you'll be brought to a screen that looks like this:

Click Generate Identity to create an Identity Token for this API. This is a necessary step when deploying any Workflow or Connector APIs to Standard Library. This token securely stores API credentials and environment variables.

The bottom of the screen will then change to:

Click Deploy Project to proceed. That's it! You'll be forwarded to the project management page when the Connector is deployed. From here, you can edit individual endpoints or open the API on Code on Standard Library to edit the code that powers your API.

Modifying this API

Once deployed, you'll be brought to a project management page that looks like this:

You can click dev (click to manage) to proceed to the endpoint summary for the dev environment you just deployed. You'll be brought to this screen:

To modify your API code, click on Edit Code in the bottom right of the screen next to the endpoint. This will open up your code in Code on Standard Library.

You can deploy updates to this code by clicking the Blue Up Button or Green Run Button after making modifications. It's that easy!

Using this API

You can run this API at any time from either (1) Code on Standard Library, or (2) the API reference page, available at stdlib.com/@user/lib/pokefusion (or whatever your @user / api-name combination is, if not pokefusion).

To add your Connector API to the Actions list, simply ship a release version of your API. To accomplish this, go back to your first API management screen, usually available at build.stdlib.com/projects/{user}/{api-name} where {user} is your username and {api-name} is the API name, in this case, likely pokefusion.

Click the Green Ship Release Button. You'll see this screen:

Click Generate Identity, then once complete, Create Release. Your management screen will refresh once complete.

Voila! Your release has been created. You can now head to build.stdlib.com, and search through available API actions. Your display name should be listed with your API:

You can now use this Connector API in projects!

That's it!

Building Connector APIs is easy! We're excited to see what you build.

Thanks,

  • Standard Library Team

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.