API-CLI

 view release on metacpan or  search on metacpan

examples/bash/digitaloceancl.bash  view on Meta::CPAN

    local cur=${COMP_WORDS[$COMP_CWORD]}
#    echo "COMP_CWORD:$COMP_CWORD cur:$cur" >>/tmp/comp
    declare -a FLAGS
    declare -a OPTIONS
    declare -a MYWORDS

    local INDEX=`expr $COMP_CWORD - 1`
    MYWORDS=("${COMP_WORDS[@]:1:$COMP_CWORD}")

    FLAGS=('--debug' 'debug' '-d' 'debug' '--verbose' 'verbose' '-v' 'verbose' '--help' 'Show command help' '-h' 'Show command help')
    OPTIONS=('--data-file' 'File with data for POST/PUT/PATCH/DELETE requests')
    __digitaloceancl_handle_options_flags

    case $INDEX in

    0)
        __comp_current_options || return
        __digitaloceancl_dynamic_comp 'commands' 'GET'$'\t''GET call'$'\n''POST'$'\t''POST call'$'\n''help'$'\t''Show command help'

    ;;
    *)

examples/bash/githubcl.bash  view on Meta::CPAN

    local cur=${COMP_WORDS[$COMP_CWORD]}
#    echo "COMP_CWORD:$COMP_CWORD cur:$cur" >>/tmp/comp
    declare -a FLAGS
    declare -a OPTIONS
    declare -a MYWORDS

    local INDEX=`expr $COMP_CWORD - 1`
    MYWORDS=("${COMP_WORDS[@]:1:$COMP_CWORD}")

    FLAGS=('--debug' 'debug' '-d' 'debug' '--verbose' 'verbose' '-v' 'verbose' '--help' 'Show command help' '-h' 'Show command help')
    OPTIONS=('--data-file' 'File with data for POST/PUT/PATCH/DELETE requests')
    __githubcl_handle_options_flags

    case $INDEX in

    0)
        __comp_current_options || return
        __githubcl_dynamic_comp 'commands' 'DELETE'$'\t''DELETE call'$'\n''GET'$'\t''GET call'$'\n''PATCH'$'\t''PATCH call'$'\n''POST'$'\t''POST call'$'\n''PUT'$'\t''PUT call'$'\n''help'$'\t''Show command help'

    ;;
    *)

examples/bash/metacpancl.bash  view on Meta::CPAN

    local cur=${COMP_WORDS[$COMP_CWORD]}
#    echo "COMP_CWORD:$COMP_CWORD cur:$cur" >>/tmp/comp
    declare -a FLAGS
    declare -a OPTIONS
    declare -a MYWORDS

    local INDEX=`expr $COMP_CWORD - 1`
    MYWORDS=("${COMP_WORDS[@]:1:$COMP_CWORD}")

    FLAGS=('--debug' 'debug' '-d' 'debug' '--verbose' 'verbose' '-v' 'verbose' '--help' 'Show command help' '-h' 'Show command help')
    OPTIONS=('--data-file' 'File with data for POST/PUT/PATCH/DELETE requests')
    __metacpancl_handle_options_flags

    case $INDEX in

    0)
        __comp_current_options || return
        __metacpancl_dynamic_comp 'commands' 'GET'$'\t''GET call'$'\n''POST'$'\t''POST call'$'\n''help'$'\t''Show command help'

    ;;
    *)

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

            schema:
              $ref: '#/definitions/blobs'
          '403':
            description: |
              API rate limit exceeded. See http://developer.github.com/v3/#rate-limiting
              for details.
    /repos/{owner}/{repo}/git/blobs/{shaCode}:
      get:
        description: |
          Get a Blob.
          Since blobs can be any arbitrary binary data, the input and responses for
          the blob API takes an encoding parameter that can be either utf-8 or
          base64. If your data cannot be losslessly sent as a UTF-8 string, you can
          base64 encode it.
        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

  - application/json
produces:
  - application/json
securityDefinitions:
  oauth_2_0:
    authorizationUrl: 'https://github.com/login/oauth/authorize'
    description: |
      OAuth2 is a protocol that lets external apps request authorization to private
      details in a user's GitHub account without getting their password. This is
      preferred over Basic Authentication because tokens can be limited to specific
      types of data, and can be revoked by users at any time.
    flow: accessCode
    scopes:
      'admin:org': ''
      'admin:org_hook': ''
      'admin:public_key': ''
      'admin:repo_hook': ''
      delete_repo: ''
      gist: ''
      notifications: ''
      public_repo: ''

examples/html/digitaloceancl.html  view on Meta::CPAN

<h1 id="NAME">NAME</h1>

<p>digitaloceancl - DigitalOcean API</p>

<h1 id="ABSTRACT">ABSTRACT</h1>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<h2 id="GLOBAL-OPTIONS">GLOBAL OPTIONS</h2>

<pre><code>    --data-file     File with data for POST/PUT/PATCH/DELETE requests
    --debug -d      debug (flag)                                     
    --verbose -v    verbose (flag)                                   
    --help -h       Show command help (flag)                         </code></pre>

<h2 id="SUBCOMMANDS">SUBCOMMANDS</h2>

<h3 id="GET">GET</h3>

<pre><code>    digitaloceancl  GET &lt;subcommands&gt;</code></pre>

examples/html/githubcl.html  view on Meta::CPAN

<h1 id="NAME">NAME</h1>

<p>githubcl - GitHub</p>

<h1 id="ABSTRACT">ABSTRACT</h1>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<h2 id="GLOBAL-OPTIONS">GLOBAL OPTIONS</h2>

<pre><code>    --data-file     File with data for POST/PUT/PATCH/DELETE requests
    --debug -d      debug (flag)                                     
    --verbose -v    verbose (flag)                                   
    --help -h       Show command help (flag)                         </code></pre>

<h2 id="SUBCOMMANDS">SUBCOMMANDS</h2>

<h3 id="DELETE">DELETE</h3>

<pre><code>    githubcl  DELETE &lt;subcommands&gt;</code></pre>

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

          name: fields
          type: string
        - description: how many results
          in: query
          name: size
          type: integer
  schemes:
  - https
  swagger: 2.0
options:
- name: data-file
  summary: File with data for POST/PUT/PATCH/DELETE requests
  type: file
- aliases:
  - d
  name: debug
  summary: debug
  type: flag
- aliases:
  - v
  name: verbose
  summary: verbose

examples/pod/digitaloceancl.pod  view on Meta::CPAN

=head1 ABSTRACT



=head1 DESCRIPTION



=head2 GLOBAL OPTIONS

    --data-file     File with data for POST/PUT/PATCH/DELETE requests
    --debug -d      debug (flag)                                     
    --verbose -v    verbose (flag)                                   
    --help -h       Show command help (flag)                         


=head2 SUBCOMMANDS

=head3  GET

    digitaloceancl  GET <subcommands>

examples/pod/githubcl.pod  view on Meta::CPAN

=head1 ABSTRACT



=head1 DESCRIPTION



=head2 GLOBAL OPTIONS

    --data-file     File with data for POST/PUT/PATCH/DELETE requests
    --debug -d      debug (flag)                                     
    --verbose -v    verbose (flag)                                   
    --help -h       Show command help (flag)                         


=head2 SUBCOMMANDS

=head3  DELETE

    githubcl  DELETE <subcommands>

examples/zsh/_digitaloceancl  view on Meta::CPAN

                ;;

                args)
                    case $line[2] in
                    /account)

                        # ---- Command: GET /account
                        _arguments -s -C \
                            '1: :->cmd1' \
                            '2: :->cmd2' \
                            '--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
                            '--debug[debug]' \
                            '-d[debug]' \
                            '--verbose[verbose]' \
                            '-v[verbose]' \
                            '--help[Show command help]' \
                            '-h[Show command help]' \
                            && ret=0


                    ;;
                    /droplets)

                        # ---- Command: GET /droplets
                        _arguments -s -C \
                            '1: :->cmd1' \
                            '2: :->cmd2' \
                            '--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
                            '--debug[debug]' \
                            '-d[debug]' \
                            '--verbose[verbose]' \
                            '-v[verbose]' \
                            '--help[Show command help]' \
                            '-h[Show command help]' \
                            && ret=0


                    ;;
                    /droplets/:id)

                        # ---- Command: GET /droplets/:id
                        _arguments -s -C \
                            '1: :->cmd1' \
                            '2: :->cmd2' \
                            '3: :->id' \
                            '--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
                            '--debug[debug]' \
                            '-d[debug]' \
                            '--verbose[verbose]' \
                            '-v[verbose]' \
                            '--help[Show command help]' \
                            '-h[Show command help]' \
                            && ret=0

                        case $state in
                        id)

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

                options => \@options,
            };

        }
    }

    $spec->{openapi} = $openapi;

    my $options = $spec->{options} ||= [];
    push @$options, {
        name => "data-file",
        type => "file",
        summary => "File with data for POST/PUT/PATCH/DELETE requests",
    };
    push @$options, {
        name => "debug",
        type => "flag",
        summary => "debug",
        aliases => ['d'],
    };
    push @$options, {
        name => "verbose",
        type => "flag",

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.790 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )