Class MkOrganization

    • Constructor Detail

      • MkOrganization

        public MkOrganization​(MkStorage stg,
                              String login)
        Public ctor.
        Parameters:
        stg - Storage
        login - Username of organization
    • Method Detail

      • login

        public String login()
        Description copied from interface: Organization
        Get this organization's login.
        Specified by:
        login in interface Organization
        Returns:
        Login name
      • json

        public javax.json.JsonObject json()
        Description copied from interface: JsonReadable
        Describe it in a JSON object.
        Specified by:
        json in interface JsonReadable
        Returns:
        JSON object
      • patch

        public void patch​(javax.json.JsonObject json)
                   throws IOException
        Description copied from interface: JsonPatchable
        Patch using this JSON object.
        Specified by:
        patch in interface JsonPatchable
        Parameters:
        json - JSON object
        Throws:
        IOException - If there is any I/O problem
      • addMember

        public void addMember​(User user)
        Add the given user to this organization.
        Parameters:
        user - User to add to the organization
        To do:
        #1107:30min Implement the "Add team membership" API (see https://developer.github.com/v3/orgs/teams/#add-team-membership ) (per https://developer.github.com/v3/orgs/members/#add-a-member , you can't add a user directly to an org; you instead add them to one of that org's teams) and replace uses of this method with uses of that API (or downgrade this method to a convenience method for unit tests).