Git Product home page Git Product logo

edgar's Introduction

EDGAR

An AI tool for generating working integrations from API documentation.

Try it out now at superface.ai/edgar

EDGAR reads and analyzes API documentation so you don't have to. Then, based on your plain english input, EDGAR builds the API integration to be used via Superface OneService. For example, you no longer need to understand how to send emails with SendGrid that also include click tracking, you can ask EDGAR and the code for exactly that implementation will be provided to you.

This repository is the datasource of APIs for EDGAR.

→ Add API
→ Check available APIs
→ Provide feedback

Add API

You can add an API to EDGAR by opening a new pull request with the API documentation. Upon review and merging, EDGAR will index the documentation and once ready, it will become available at superface.ai/edgar

API documentation format

The format for the API documentation is a plain text file. Markdown is welcome but not required.

When formating the API documentation, it is important to use the separator. Documentation consists of various topics, divided by pages or headings. These includes authentication, rate limiting, general instructions, API operations (often grouped by resources), and others. When submitting the API docs, use the the separator to split these topics up and help EDGAR distinguish between them.

The separator is a sequence of equal signs (===========) terminated by a newline. At minimum use 5 equal (=) characters to form a separator. The API docs ready for EDGAR might look something like the following:

# Welcome to our docs
(...)
================================
# API Basics
(...)
================================
# Authorizing Requests
(...)
================================
# /todos/:id/items
This endpoint lists all items (...)
================================
(...)

Still not sure? Check existing APIs for more examples.

You can submit your API documentation as a single text .txt file in docs directory.

Opened pull request are usually reviewed in few hours. In the meantime, consider starring this repo so that you don't miss new developments.

If you don't want to submit an API docs on your own, feel free to suggest a new API and we will add it for you!

edgar's People

Contributors

janhalama avatar kysely avatar martyndavies avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

inayet

edgar's Issues

[FEEDBACK]: superface schema

EDGAR

  • Version: 2023-05-04-10

It would be awsome to be able to create superface schemas (provider, use cases, mappings)

Feedback

No response / result

Used Prompt

  • Prompt: retrieve character's home planet
  • API: swapi

Feedback

The resulting profile and map is not expected. I would expect the response with homeworld field.
Screenshot 2023-03-23 at 13 26 34

....
Response body is not valid JSON
Getting response schema...OK
{
  event: 'processed:response',
  at: 2023-03-23T12:10:37.800Z,
  schema: '{}'
}
Getting error response schema...OK
- PROFILE ----------------------------------------------
name = "star-wars-universe/get-home-planet"
version = "0.0.0"

"Fetches the home planet of a given character in JSON format."
usecase RetrieveCharactersHomePlanet safe  {
  input {
    "The name of the character to search for in the Star Wars universe."
    search! string
  }
  error {
    server! string
  
    detail! string
  }
}


- MAP --------------------------------------------------
profile = "star-wars-universe/[email protected]"
provider = "swapi"

map RetrieveCharactersHomePlanet {
  http GET "/people/" {
    request {
      query {
        search = input.search
      }
    }

    response 404 "application/json" {
      map error {
        server = headers.server
        detail = body.detail
      }
    }
  }
}

[FEEDBACK] here: creating integration took too long

Used Prompt

  • API: here
  • Prompt: build a cv
  • EdgarId: ig_0Dz6XlLB79nxP9lqZyeUT
  • Version: 2023-04-13-10

Feedback

It is stuck on step processing:metada and after a few minutes it fails with error (processing) or timeout (UI).

Looks like this provider is very slow in general.

[FEEDBACK] wttr_in:

Used Prompt

  • API: wttr_in
  • Prompt: weather in Prague
  • EdgarId: ig_9udyizGjL3IDFTLBH0o1e
  • Version: 2023-04-17-14

Feedback

The generated curl fails:
curl 'https://edgar-service.superface.dev/graphql' \ -H 'accept: application/json, multipart/mixed' \ -H 'authorization: SUPERFACE-SDK-TOKEN sfs_45137625fc88f6ecadb6f61010a766efef63fdea0ca2d73d736c054fe10c89a20e78cdf7d28f1c37128d40a91e1b0eff078e4185307a575536924c22037b1e3e_5bb37721' \ -H 'content-type: application/json' \ --data-raw $'{"query": "query WeatherRetrieval {\\n WeatherDataGetWeather {\\n WeatherRetrieval(input: {city: \\"Prague\\", format: \\"json\\"}) {\\n result {\\n currentCondition {\\n FeelsLikeC\\n FeelsLikeF\\n cloudcover\\n humidity\\n observation_time\\n precipMM\\n pressure\\n temp_C\\n temp_F\\n uvIndex\\n visibility\\n weatherCode\\n weatherDesc {\\n value\\n }\\n weatherIconUrl {\\n value\\n }\\n winddir16Point\\n winddirDegree\\n windspeedKmph\\n windspeedMiles\\n }\\n }\\n }\\n }\\n}"}'

Error message:
{"errors":[{"message":"Request ended with error: FetchError: invalid json response body at https://wttr.in/Prague?format=json reason: Unexpected token j in JSON at position 0\n\nAt 2023-04-18T09:03:22.942Z\nNo backup provider available\n","locations":[{"line":3,"column":5}],"path":["WeatherDataGetWeather","WeatherRetrieval"],"extensions":{}}],"data":{"WeatherDataGetWeather":{"WeatherRetrieval":null}}}%

[API REQUEST]:

Link to API Documentation

No response

What are your usecases for this API?

No response

What's your knowledge of this API?

None

[FEEDBACK] wttr-in:

Used Prompt

  • API: wttr-in
  • Prompt: Get me list of cities where actually rains
  • Version: 2023-03-24-11

Feedback

Got this result:

query GetListOfCitiesWhereItActuallyRains {
  WeatherInformationRainingCities {
    GetListOfCitiesWhereItActuallyRains(input: {}) {
      result {
        rainingCities {
          city
          country
          latitude
          longitude
        }
      }
    }
  }
}
errors": [
    {
      "message": "JSON Parse error: Unexpected EOF",
      "stack": "parse@[native code]\npromiseReactionJob@[native code]"

Randomness in result

Used Prompt

  • Prompt: retrieve character home planet
  • API: swapi

Feedback

The query yields different result from time to time.

Sometimes it resolves the expected /people/?search= with mapped homeworld field. Sometimes it resolves to /planets/?search=

[API REQUEST]:

Link to API Documentation

No response

What are your usecases for this API?

No response

What's your knowledge of this API?

None

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.