Giter Site home page Giter Site logo

githubapi's Introduction

GitHubAPI

Github API for InterSystems Data Platforms

Installation

Import into any namespace and compile.

Usage

First create api object to interact with GitHub API (provide valid GitHub user and pass):

Set api = ##class(GitHub.API).%New("user","pass")

After that you can query some GitHub APIs. For example to get info about all public repos in organization:

Do api.GetOrgRepos("intersystems-ru","public",.repos)

All availible API calls are listed in class documentation of GitHub.API class.

Some workflows to automate work with GitHub are availible in GitHub.Workflows class.

Mirroring

  1. Create repos.json file:
{
    "mirrors": [{
        "from": "intersystems-ru",  // owners: user or organization
        "to": "intersystems-community",
        "org": 1,                   // 1: if you want to mirror in organization owner. 0: if user owner.
        "repos": [
            "GitHubAPI"             // just repos name f.e. 'GitHubAPI'
        ]
    }, {
        "from": "user1",
        "to": "user2",
        "org": 0,
        "repos": [
            "repo1",
            "repo2"
        ]
    }]
}
  1. Set repos.json location in param, class GitHub.API. Parameter Directory = "C:/temp/mirror/"
  2. Set api = ##class(GitHub.API).%New("user","pass")
  3. Do api.Mirror()

Task

Create task:

  • Task Type = RunLegacyTask
  • ExecuteCode = Do ##class(GitHub.API).UpdateMirrors()
  • Choose the right time to start the task

Some API method I want is not availible. What do I do?

Everyone is welcome to add methods or wokflows via pull requests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.