API-CLI

 view release on metacpan or  search on metacpan

examples/githubcl-appspec.yaml  view on Meta::CPAN

            schema:
              $ref: '#/definitions/team'
          '403':
            description: |
              API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting
              for details.
    /rate_limit:
      get:
        description: |
          Get your current rate limit status
          Note: Accessing this endpoint does not count against your rate limit.
        parameters:
        - description: |
            You can check the current version of media type in responses.
          in: header
          name: X-GitHub-Media-Type
          type: string
        - description: Is used to set specified media type.
          in: header
          name: Accept
          type: string

examples/githubcl-appspec.yaml  view on Meta::CPAN

            schema:
              $ref: '#/definitions/commits'
          '403':
            description: |
              API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting
              for details.
    /repos/{owner}/{repo}/commits/{ref}/status:
      get:
        description: |
          Get the combined Status for a specific Ref
          The Combined status endpoint is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details.
          To access this endpoint during the preview period, you must provide a custom media type in the Accept header:
          application/vnd.github.she-hulk-preview+json
        parameters:
        - description: Name of repository owner.
          in: path
          name: owner
          required: true
          type: string
        - description: Name of repository.
          in: path
          name: repo

examples/githubcl-appspec.yaml  view on Meta::CPAN

            description: |
              API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting
              for details.
          '404':
            description: User has no membership with team
      put:
        description: |
          Add team membership.
          In order to add a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with.

          If the user is already a part of the team's organization (meaning they're on at least one other team in the organization), this endpoint will add the user to the team.

          If the user is completely unaffiliated with the team's organization (meaning they're on none of the organization's teams), this endpoint will send an invitation to the user via email. This newly-created membership will be in the 'pending' s...
        parameters:
        - description: Id of team.
          in: path
          name: teamId
          required: true
          type: integer
        - description: Name of a member.
          in: path
          name: username
          required: true

examples/githubcl-openapi.yaml  view on Meta::CPAN

          schema:
            $ref: '#/definitions/team'
        '403':
          description: |
            API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting
            for details.
  /rate_limit:
    get:
      description: |
        Get your current rate limit status
        Note: Accessing this endpoint does not count against your rate limit.
      parameters:
        - description: |
            You can check the current version of media type in responses.
          in: header
          name: X-GitHub-Media-Type
          type: string
        - description: Is used to set specified media type.
          in: header
          name: Accept
          type: string

examples/githubcl-openapi.yaml  view on Meta::CPAN

          schema:
            $ref: '#/definitions/commits'
        '403':
          description: |
            API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting
            for details.
  '/repos/{owner}/{repo}/commits/{ref}/status':
    get:
      description: |
        Get the combined Status for a specific Ref
        The Combined status endpoint is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details.
        To access this endpoint during the preview period, you must provide a custom media type in the Accept header:
        application/vnd.github.she-hulk-preview+json
      parameters:
        - description: Name of repository owner.
          in: path
          name: owner
          required: true
          type: string
        - description: Name of repository.
          in: path
          name: repo

examples/githubcl-openapi.yaml  view on Meta::CPAN

          description: |
            API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting
            for details.
        '404':
          description: User has no membership with team
    put:
      description: |
        Add team membership.
        In order to add a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with.

        If the user is already a part of the team's organization (meaning they're on at least one other team in the organization), this endpoint will add the user to the team.

        If the user is completely unaffiliated with the team's organization (meaning they're on none of the organization's teams), this endpoint will send an invitation to the user via email. This newly-created membership will be in the 'pending' sta...
      parameters:
        - description: Id of team.
          in: path
          name: teamId
          required: true
          type: integer
        - description: Name of a member.
          in: path
          name: username
          required: true

lib/API/CLI.pm  view on Meta::CPAN


This is an experimental first version.

With API::CLI you can create a simple commandline client for any
REST API which has an OpenAPI specification.

    # 1. parameter: owner
    # 2. parameter: repo
    % githubcl GET /repos/:owner/:repo perlpunk API-CLI-p5

The generated help will show all methods, endpoints, parameters and
options.

Query parameters are represented as command line options starting with
C<--q->:

    % metacpancl GET /pod/:module App::Spec --q-content-type text/x-pod
    =head1 NAME

    App::Spec - Specification for commandline apps
    ...



( run in 0.377 second using v1.01-cache-2.11-cpan-27979f6cc8f )