GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PITHUB::ISSUES (3)

.ds Aq ’

NAME

Pithub::Issues - Github v3 Issues API

CONTENTS

VERSION

version 0.01033

METHODS

    assignees

Provides access to Pithub::Issues::Assignees.

    comments

Provides access to Pithub::Issues::Comments.

    create

o Create an issue



    POST /repos/:user/:repo/issues



Parameters:
o <B>userB>: mandatory string
o <B>repoB>: mandatory string
o <B>dataB>: mandatory hashref, having following keys:
o <B>titleB>: mandatory string
o <B>bodyB>: optional string
o <B>assigneeB>: optional string - Login for the user that this issue should be assigned to.
o <B>milestoneB>: optional number - Milestone to associate this issue with.
o <B>labelsB>: optional arrayref of strings - Labels to associate with this issue.

Examples:



    my $i = Pithub::Issues->new;
    my $result = $i->create(
        user => plu,
        repo => Pithub,
        data => {
            assignee  => octocat,
            body      => "Im having a problem with this.",
            labels    => [ Label1, Label2 ],
            milestone => 1,
            title     => Found a bug
        }
    );



Response: <B>Status: 201 CreatedB>



    {
        "url": "https://api.github.com/repos/octocat/Hello-World/issues/1",
        "html_url": "https://github.com/octocat/Hello-World/issues/1",
        "number": 1347,
        "state": "open",
        "title": "Found a bug",
        "body": "Im having a problem with this.",
        "user": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "labels": [
        {
            "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
            "name": "bug",
            "color": "f29513"
        }
        ],
        "assignee": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "milestone": {
            "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
            "number": 1,
            "state": "open",
            "title": "v1.0",
            "description": "",
            "creator": {
                "login": "octocat",
                "id": 1,
                "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                "url": "https://api.github.com/users/octocat"
            },
            "open_issues": 4,
            "closed_issues": 8,
            "created_at": "2011-04-10T20:09:31Z",
            "due_on": null
        },
        "comments": 0,
        "pull_request": {
            "html_url": "https://github.com/octocat/Hello-World/issues/1",
            "diff_url": "https://github.com/octocat/Hello-World/issues/1.diff",
            "patch_url": "https://github.com/octocat/Hello-World/issues/1.patch"
        },
        "closed_at": null,
        "created_at": "2011-04-22T13:33:48Z",
        "updated_at": "2011-04-22T13:33:48Z"
    }



    events

Provides access to Pithub::Issues::Events.

    get

o Get a single issue



    GET /repos/:user/:repo/issues/:id



Parameters:
o <B>userB>: mandatory string
o <B>repoB>: mandatory string
o <B>issue_idB>: mandatory integer

Examples:



    my $i = Pithub::Issues->new;
    my $result = $i->get(
        user => plu,
        repo => Pithub,
        issue_id => 1,
    );



Response: <B>Status: 200 OKB>



    {
        "url": "https://api.github.com/repos/octocat/Hello-World/issues/1",
        "html_url": "https://github.com/octocat/Hello-World/issues/1",
        "number": 1347,
        "state": "open",
        "title": "Found a bug",
        "body": "Im having a problem with this.",
        "user": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "labels": [
        {
            "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
            "name": "bug",
            "color": "f29513"
        }
        ],
        "assignee": {
            "login": "octocat",
            "id": 1,
            "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
            "url": "https://api.github.com/users/octocat"
        },
        "milestone": {
            "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
            "number": 1,
            "state": "open",
            "title": "v1.0",
            "description": "",
            "creator": {
                "login": "octocat",
                "id": 1,
                "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                "url": "https://api.github.com/users/octocat"
            },
            "open_issues": 4,
            "closed_issues": 8,
            "created_at": "2011-04-10T20:09:31Z",
            "due_on": null
        },
        "comments": 0,
        "pull_request": {
            "html_url": "https://github.com/octocat/Hello-World/issues/1",
            "diff_url": "https://github.com/octocat/Hello-World/issues/1.diff",
            "patch_url": "https://github.com/octocat/Hello-World/issues/1.patch"
        },
        "closed_at": null,
        "created_at": "2011-04-22T13:33:48Z",
        "updated_at": "2011-04-22T13:33:48Z"
    }



    labels

Provides access to Pithub::Issues::Labels.

    list

o List the issues of the authenticated user



    GET /issues



This API call can be influenced via the params hashref with following parameters:
o <B>filterB>: one of the following:
o <B>assignedB>: Issues assigned to you (default)
o <B>createdB>: Issues created by you
o <B>mentionedB>: Issues mentioning you
o <B>subscribedB>: Issues you’re subscribed to updates for
o <B>stateB>: one of the following:
o <B>openB> (default)
o <B>closedB>
o <B>labelsB>: String list of comma separated Label names. Example: bug,ui,@high
o <B>sortB>: one of the following:
o <B>createdB> (default)
o <B>updatedB>
o <B>commentsB>
o <B>directionB>: one of the following:
o <B>ascB>
o <B>descB> (default)
o <B>sinceB>: optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

Examples:



    my $i      = Pithub::Issues->new;
    my $result = $i->list(
        params => {
            filter    => assigned,
            state     => open,
            labels    => bug,
            sort      => updated,
            direction => asc,
        }
    );



Response: <B>Status: 200 OKB>



    [
        {
            "url": "https://api.github.com/repos/octocat/Hello-World/issues/1",
            "html_url": "https://github.com/octocat/Hello-World/issues/1",
            "number": 1347,
            "state": "open",
            "title": "Found a bug",
            "body": "Im having a problem with this.",
            "user": {
                "login": "octocat",
                "id": 1,
                "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                "url": "https://api.github.com/users/octocat"
            },
            "labels": [
            {
                "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
                "name": "bug",
                "color": "f29513"
            }
            ],
            "assignee": {
                "login": "octocat",
                "id": 1,
                "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                "url": "https://api.github.com/users/octocat"
            },
            "milestone": {
                "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
                "number": 1,
                "state": "open",
                "title": "v1.0",
                "description": "",
                "creator": {
                    "login": "octocat",
                    "id": 1,
                    "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                    "url": "https://api.github.com/users/octocat"
                },
                "open_issues": 4,
                "closed_issues": 8,
                "created_at": "2011-04-10T20:09:31Z",
                "due_on": null
            },
            "comments": 0,
            "pull_request": {
                "html_url": "https://github.com/octocat/Hello-World/issues/1",
                "diff_url": "https://github.com/octocat/Hello-World/issues/1.diff",
                "patch_url": "https://github.com/octocat/Hello-World/issues/1.patch"
            },
            "closed_at": null,
            "created_at": "2011-04-22T13:33:48Z",
            "updated_at": "2011-04-22T13:33:48Z"
        }
    ]



o List issues for a repository



    GET /repos/:user/:repo/issues



Parameters:
o <B>userB>: mandatory string
o <B>repoB>: mandatory string

This API call can be influenced via the params hashref with following parameters:
o <B>milestoneB>: one of the following:
o Integer Milestone number
o none for Issues with no Milestone
o * for Issues with any Milestone
o <B>stateB>: one of the following:
o <B>openB> (default)
o <B>closedB>
o <B>assigneeB>: one of the following:
o String User login
o none for Issues with no assigned User
o * for Issues with any assigned User
o <B>mentionedB>: String User login
o <B>labelsB>: String list of comma separated Label names. Example: bug,ui,@high
o <B>sortB>: one of the following:
o <B>createdB> (default)
o <B>updatedB>
o <B>commentsB>
o <B>directionB>: one of the following:
o <B>ascB>
o <B>descB> (default)
o <B>sinceB>: optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

Examples:



    my $i      = Pithub::Issues->new;
    my $result = $i->list(
        user    => plu,
        repo    => Pithub,
        params => {
            milestone => 42,
            state     => open,
            labels    => bug,
            sort      => updated,
            direction => asc,
        }
    );



Response: <B>Status: 200 OKB>



    [
        {
            "url": "https://api.github.com/repos/octocat/Hello-World/issues/1",
            "html_url": "https://github.com/octocat/Hello-World/issues/1",
            "number": 1347,
            "state": "open",
            "title": "Found a bug",
            "body": "Im having a problem with this.",
            "user": {
                "login": "octocat",
                "id": 1,
                "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                "url": "https://api.github.com/users/octocat"
            },
            "labels": [
            {
                "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug",
                "name": "bug",
                "color": "f29513"
            }
            ],
            "assignee": {
                "login": "octocat",
                "id": 1,
                "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                "url": "https://api.github.com/users/octocat"
            },
            "milestone": {
                "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
                "number": 1,
                "state": "open",
                "title": "v1.0",
                "description": "",
                "creator": {
                    "login": "octocat",
                    "id": 1,
                    "gravatar_url": "https://github.com/images/error/octocat_happy.gif",
                    "url": "https://api.github.com/users/octocat"
                },
                "open_issues": 4,
                "closed_issues": 8,
                "created_at": "2011-04-10T20:09:31Z",
                "due_on": null
            },
            "comments": 0,
            "pull_request": {
                "html_url": "https://github.com/octocat/Hello-World/issues/1",
                "diff_url": "https://github.com/octocat/Hello-World/issues/1.diff",
                "patch_url": "https://github.com/octocat/Hello-World/issues/1.patch"
            },
            "closed_at": null,
            "created_at": "2011-04-22T13:33:48Z",
            "updated_at": "2011-04-22T13:33:48Z"
        }
    ]



    milestones

Provides access to Pithub::Issues::Milestones.

    update

o Edit an issue



    PATCH /repos/:user/:repo/issues/:id



Parameters:
o <B>userB>: mandatory string
o <B>repoB>: mandatory string
o <B>dataB>: mandatory hashref, having following keys:
o <B>titleB>: mandatory string
o <B>bodyB>: optional string
o <B>assigneeB>: optional string - Login for the user that this issue should be assigned to.
o <B>milestoneB>: optional number - Milestone to associate this issue with.
o <B>labelsB>: optional arrayref of strings - Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty arrayref ([]) to clear all Labels from the Issue.

Examples:



    my $i = Pithub::Issues->new;
    my $result = $i->update(
        user     => plu,
        repo     => Pithub,
        issue_id => 1,
        data     => {
            assignee  => octocat,
            body      => "Im having a problem with this.",
            labels    => [ Label1, Label2 ],
            milestone => 1,
            state     => open,
            title     => Found a bug
        }
    );



AUTHOR

Johannes Plunien <plu@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Johannes Plunien.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PITHUB::ISSUES (3) 2016-01-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.