Rust Assistant

Rust Assistant · Ações GPT

Crates.io API

Retrieve crates related data from crates.io

  • GET /api/v1/cratesSearchCratesOnCratesIo

    Search for crates on crates.io using the provided keywords. (default sort method should be relevance). Use this interface to get the latest version of a crate.

  • GET /api/v1/crates/{crate}/{version}GetCrateVersionInformation

    Retrieve information for a specific version of a crate based on the crate name and its semantic versioning.

  • GET /api/v1/crates/{crate}/owner_userGetCrateOwnerUserList

    Query the list of owner users for a crate.

  • GET /api/v1/crates/{crate}/owner_teamGetCrateOwnerTeamList

    Query the list of owner teams for a crate.

  • GET /api/v1/crates/{crate}/{version}/dependenciesGetCrateDependencies

    Retrieve the dependencies of a specific version of a crate based on the crate name and its semantic versioning.

  • GET /api/v1/crates/{crate}/reverse_dependenciesGetCrateDependents

    Retrieve the reverse dependencies (or dependents) of a crate.

  • GET /api/v1/categoriesGetCategories

    This endpoint retrieves a list of categories from the Crates.io registry.

Esquema API original
{
  "openapi": "3.1.0",
  "info": {
    "title": "Crates.io API",
    "description": "Retrieve crates related data from crates.io",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://crates.io/"
    }
  ],
  "paths": {
    "/api/v1/crates": {
      "get": {
        "description": "Search for crates on crates.io using the provided keywords. (default sort method should be relevance). Use this interface to get the latest version of a crate.",
        "operationId": "SearchCratesOnCratesIo",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (starts from 1).",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Page size.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Query. A broader search term or phrase used to search for relevant crates (packages in the Rust language) on crates.io. This query could be based on the crate's name, description, or other related information. The user's input query is utilized to search the entire crates database to find matching or relevant entries.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "description": "Not keywords for searching, but tags marked by the crate author. Don't use this field unless the user precedes a keyword with a # sign, or explicitly states that it's a keyword tagged with a crate.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "description": "One of all the Categories on crates.io must be an accurate category name.",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "This parameter defines the sorting criteria for query results. (default value should be relevance)",
            "enum": [
              "relevance",
              "downloads",
              "recent-downloads",
              "recent-updates",
              "new"
            ],
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids[]",
            "in": "query",
            "description": "Array of exact crate names to retrieve information for. Used when needing to search information for multiple crates simultaneously.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/v1/crates/{crate}/{version}": {
      "get": {
        "description": "Retrieve information for a specific version of a crate based on the crate name and its semantic versioning.",
        "operationId": "GetCrateVersionInformation",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "description": "The semantic version number of the specified crate, following the Semantic versioning specification.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/v1/crates/{crate}/owner_user": {
      "get": {
        "description": "Query the list of owner users for a crate.",
        "operationId": "GetCrateOwnerUserList",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/v1/crates/{crate}/owner_team": {
      "get": {
        "description": "Query the list of owner teams for a crate.",
        "operationId": "GetCrateOwnerTeamList",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/v1/crates/{crate}/{version}/dependencies": {
      "get": {
        "operationId": "GetCrateDependencies",
        "description": "Retrieve the dependencies of a specific version of a crate based on the crate name and its semantic versioning.",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "description": "The semantic version number of the specified crate, following the Semantic versioning specification.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v1/crates/{crate}/reverse_dependencies": {
      "get": {
        "operationId": "GetCrateDependents",
        "description": "Retrieve the reverse dependencies (or dependents) of a crate.",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (starts from 1).",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Page size.",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ]
      }
    },
    "/api/v1/categories": {
      "get": {
        "operationId": "GetCategories",
        "description": "This endpoint retrieves a list of categories from the Crates.io registry.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "The page number of the results.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "The number of items per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "The sorting order of the results, alphabetical or by crates count",
            "required": false,
            "schema": {
              "type": "string",
              "default": "alpha",
              "enum": [
                "alpha",
                "crates"
              ]
            }
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {}
  }
}

Rust Assistant API (shuttle.rs)

Read crate source code.

  • GET /api/directory/{crate}/{version}ReadCrateRootDirectory

    Read crate root directory file list.

  • GET /api/directory/{crate}/{version}/{path}ReadCrateSubdirectory

    Read a subdirectory in crate. This interface cannot be used to read the crate’s root directory.

  • GET /api/file/{crate}/{version}/{path}ReadCrateFile

    Read file in crate.

  • GET /api/github/directory/{owner}/{repo}ReadGithubRepositoryRootDirectory

    Read the root directory of a GitHub repository.

  • GET /api/github/directory/{owner}/{repo}/{path}ReadGithubRepositorySubdirectory

    Read a subdirectory in a GitHub repository.

  • GET /api/github/file/{owner}/{repo}/{path}ReadGithubRepositoryFile

    Read the content of a file in a GitHub repository.

  • GET /api/github/issue/{owner}/{repo}SearchGithubRepositoryForIssues

    Search for issues in a GitHub repository.

  • GET /api/github/issue/{owner}/{repo}/{number}GetGitHubIssueTimeline

    Get the timeline of an issue in a GitHub repository.

  • GET /api/github/branches/{owner}/{repo}ListGithubRepositoryBranches

    Get the list of branches in a GitHub repository.

  • GET /api/items/{crate}/{version}SearchCrateForItems

    Enables efficient but not comprehensive search of code items like structs, enums, traits, and more in a specific crate version, providing documentation for the found items using an index-based approach. Note: Searches don't include items defined within macros.

  • GET /api/lines/{crate}/{version}FullTextSearch

    Full Text Search in Crate Files

Esquema API original
{
  "openapi": "3.1.0",
  "info": {
    "title": "Rust Assistant API (shuttle.rs)",
    "description": "Read crate source code.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://rust-assistant-shuttle.shuttleapp.rs"
    }
  ],
  "paths": {
    "/api/directory/{crate}/{version}": {
      "get": {
        "description": "Read crate root directory file list.",
        "operationId": "ReadCrateRootDirectory",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "description": "The semantic version number of the crate, following the Semantic versioning specification.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/directory/{crate}/{version}/{path}": {
      "get": {
        "description": "Read a subdirectory in crate. This interface cannot be used to read the crate’s root directory.",
        "operationId": "ReadCrateSubdirectory",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "description": "The semantic version number of the crate, following the Semantic versioning specification.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "Relative path of a directory in crate",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/file/{crate}/{version}/{path}": {
      "get": {
        "description": "Read file in crate.",
        "operationId": "ReadCrateFile",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "description": "The semantic version number of the crate, following the Semantic versioning specification.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "Relative path of a file in crate",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Start line number of the file (inclusive)",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "End line number of the file (inclusive)",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/github/directory/{owner}/{repo}": {
      "get": {
        "description": "Read the root directory of a GitHub repository.",
        "operationId": "ReadGithubRepositoryRootDirectory",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "description": "The owner of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "description": "The name of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "description": "The name of the branch.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/github/directory/{owner}/{repo}/{path}": {
      "get": {
        "description": "Read a subdirectory in a GitHub repository.",
        "operationId": "ReadGithubRepositorySubdirectory",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "description": "The owner of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "description": "The name of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "Relative path of a directory in the repository",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "description": "The name of the branch.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/github/file/{owner}/{repo}/{path}": {
      "get": {
        "description": "Read the content of a file in a GitHub repository.",
        "operationId": "ReadGithubRepositoryFile",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "description": "The owner of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "description": "The name of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "Relative path of a file in the repository",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "description": "The name of the branch.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/github/issue/{owner}/{repo}": {
      "get": {
        "description": "Search for issues in a GitHub repository.",
        "operationId": "SearchGithubRepositoryForIssues",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "description": "The owner of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "description": "The name of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "The search string used to find matches within the issues.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/github/issue/{owner}/{repo}/{number}": {
      "get": {
        "description": "Get the timeline of an issue in a GitHub repository.",
        "operationId": "GetGitHubIssueTimeline",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "description": "The owner of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "description": "The name of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "The issue number.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/github/branches/{owner}/{repo}": {
      "get": {
        "description": "Get the list of branches in a GitHub repository.",
        "operationId": "ListGithubRepositoryBranches",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "description": "The owner of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "description": "The name of the GitHub repository.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/items/{crate}/{version}": {
      "get": {
        "description": "Enables efficient but not comprehensive search of code items like structs, enums, traits, and more in a specific crate version, providing documentation for the found items using an index-based approach. Note: Searches don't include items defined within macros.",
        "operationId": "SearchCrateForItems",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "description": "The semantic version number of the crate, following the Semantic versioning specification.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Determines the type of items to search within the crate. Options include 'all' for any type, 'struct' for structures, 'enum' for enumerations, 'trait' for traits, 'impl-type' for type implementations, 'impl-trait-for-type' for trait implementations for a type, 'macro' for macros, 'attribute-macro' for attribute macros, 'function' for standalone functions, and 'type-alias' for type aliases.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "struct",
                "enum",
                "trait",
                "impl-type",
                "impl-trait-for-type",
                "macro",
                "attribute-macro",
                "function",
                "type-alias"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "The query parameter is used for searching specific items within a crate. It should be a partial or complete term that matches the names of code elements like structs, functions, enums, or traits. Spaces are not allowed in this parameter. The search is case insensitive.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "The relative path within the crate's directory structure where the search should be focused. This path should start from the crate's root directory.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/lines/{crate}/{version}": {
      "get": {
        "description": "Full Text Search in Crate Files",
        "operationId": "FullTextSearch",
        "parameters": [
          {
            "name": "crate",
            "in": "path",
            "description": "The exact name of the crate.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "description": "The semantic version number of the crate, following the Semantic versioning specification.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "The search string or pattern used to find matches within the crate files.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "description": "The mode of searching: either 'plain-text' for direct string matches or 'regex' for regular expression-based searching.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "plain-text",
                "regex"
              ]
            }
          },
          {
            "name": "case_sensitive",
            "in": "query",
            "description": "Specifies whether the search should be case-sensitive. Defaults to false if not provided.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "whole_word",
            "in": "query",
            "description": "Indicates if the search should match whole words only. Defaults to false if not provided.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "max_results",
            "in": "query",
            "description": "The maximum number of search results to return. If not specified, all matching results will be returned.",
            "required": false,
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 1
            }
          },
          {
            "name": "file_ext",
            "in": "query",
            "description": "A comma-separated list of file extensions to include in the search. Each extension should be specified without a leading dot. For example, 'rs,txt' would search for Rust and text files. If not provided, all file types will be considered.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "The relative path within the crate to limit the search scope. If not provided, the entire crate will be searched.",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {}
  }
}