GitHub -- Using CURL

 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 CURL : -

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 curl --request GET \
--url "https://api.github.com/octocat" \
--header "Authorization: Bearer YOUR-TOKEN"

 

 

curl --request GET \
--url "https://api.github.com/repos/octocat/Spoon-Knife/issues?per_page=2&sort=updated&direction=asc" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer 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"

 

[
  {
    "url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/113",
    "repository_url": "https://api.github.com/repos/octocat/Spoon-Knife",
    "labels_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/113/labels{/name}",
    "comments_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/113/comments",
    "events_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/113/events",
    "html_url": "https://github.com/octocat/Spoon-Knife/issues/113",
    "id": 2122999,
    "node_id": "MDU6SXNzdWUyMTIyOTk5",
    "number": 113,
    "title": "ciao raga",
    "user": {
      "login": "massigrillo",
      "id": 1167131,
      "node_id": "MDQ6VXNlcjExNjcxMzE=",
      "avatar_url": "https://avatars.githubusercontent.com/u/1167131?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/massigrillo",
      "html_url": "https://github.com/massigrillo",
      "followers_url": "https://api.github.com/users/massigrillo/followers",
      "following_url": "https://api.github.com/users/massigrillo/following{/other_user}",
      "gists_url": "https://api.github.com/users/massigrillo/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/massigrillo/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/massigrillo/subscriptions",
      "organizations_url": "https://api.github.com/users/massigrillo/orgs",
      "repos_url": "https://api.github.com/users/massigrillo/repos",
      "events_url": "https://api.github.com/users/massigrillo/events{/privacy}",
      "received_events_url": "https://api.github.com/users/massigrillo/received_events",
      "type": "User",
      "site_admin": false
    },
    "labels": [

    ],
    "state": "open",
    "locked": false,
    "assignee": null,
    "assignees": [

    ],
    "milestone": null,
    "comments": 0,
    "created_at": "2011-11-02T16:01:58Z",
    "updated_at": "2011-11-02T16:01:58Z",
    "closed_at": null,
    "author_association": "NONE",
    "active_lock_reason": null,
    "body": "tutto rego?\n",
    "reactions": {
      "url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/113/reactions",
      "total_count": 0,
      "+1": 0,
      "-1": 0,
      "laugh": 0,
      "hooray": 0,
      "confused": 0,
      "heart": 0,
      "rocket": 0,
      "eyes": 0
    },
    "timeline_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/113/timeline",
    "performed_via_github_app": null,
    "state_reason": null
  },
  {
    "url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/114",
    "repository_url": "https://api.github.com/repos/octocat/Spoon-Knife",
    "labels_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/114/labels{/name}",
    "comments_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/114/comments",
    "events_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/114/events",
    "html_url": "https://github.com/octocat/Spoon-Knife/issues/114",
    "id": 2140720,
    "node_id": "MDU6SXNzdWUyMTQwNzIw",
    "number": 114,
    "title": "new Test",
    "user": {
      "login": "claud22",
      "id": 1171406,
      "node_id": "MDQ6VXNlcjExNzE0MDY=",
      "avatar_url": "https://avatars.githubusercontent.com/u/1171406?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/claud22",
      "html_url": "https://github.com/claud22",
      "followers_url": "https://api.github.com/users/claud22/followers",
      "following_url": "https://api.github.com/users/claud22/following{/other_user}",
      "gists_url": "https://api.github.com/users/claud22/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/claud22/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/claud22/subscriptions",
      "organizations_url": "https://api.github.com/users/claud22/orgs",
      "repos_url": "https://api.github.com/users/claud22/repos",
      "events_url": "https://api.github.com/users/claud22/events{/privacy}",
      "received_events_url": "https://api.github.com/users/claud22/received_events",
      "type": "User",
      "site_admin": false
    },
    "labels": [

    ],
    "state": "open",
    "locked": false,
    "assignee": null,
    "assignees": [

    ],
    "milestone": null,
    "comments": 0,
    "created_at": "2011-11-04T04:24:23Z",
    "updated_at": "2011-11-04T04:24:23Z",
    "closed_at": null,
    "author_association": "NONE",
    "active_lock_reason": null,
    "body": "Yes it is!\n",
    "reactions": {
      "url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/114/reactions",
      "total_count": 0,
      "+1": 0,
      "-1": 0,
      "laugh": 0,
      "hooray": 0,
      "confused": 0,
      "heart": 0,
      "rocket": 0,
      "eyes": 0
    },
    "timeline_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/114/timeline",
    "performed_via_github_app": null,
    "state_reason": null
  }
]

===

Comments