Interface ScraperTargetsApi


@ThreadSafe public interface ScraperTargetsApi
Represents an HTTP API handler for scraper targets.
Author:
Jakub Bednar (bednar@github) (22/01/2019 08:08)
  • Method Details

    • createScraperTarget

      @Nonnull ScraperTargetResponse createScraperTarget(@Nonnull ScraperTargetRequest scraperTargetRequest)
      Creates a new ScraperTarget and sets ScraperTargetResponse.getId() with the new identifier.
      Parameters:
      scraperTargetRequest - the scraper to create
      Returns:
      ScraperTarget created
    • createScraperTarget

      @Nonnull ScraperTargetResponse createScraperTarget(@Nonnull String name, @Nonnull String url, @Nonnull String bucketID, @Nonnull String orgID)
      Parameters:
      name - the name of the new ScraperTarget
      url - the url of the new ScraperTarget
      bucketID - the id of the scraperTarget that its use to writes
      orgID - the id of the organization that owns new ScraperTarget
      Returns:
      ScraperTarget created
    • updateScraperTarget

      @Nonnull ScraperTargetResponse updateScraperTarget(@Nonnull ScraperTargetResponse scraperTargetResponse)
      Update a ScraperTarget.
      Parameters:
      scraperTargetResponse - ScraperTarget update to apply
      Returns:
      ScraperTarget updated
    • updateScraperTarget

      @Nonnull ScraperTargetResponse updateScraperTarget(@Nonnull String scraperTargetID, @Nonnull ScraperTargetRequest scraperTargetRequest)
      Update a ScraperTarget.
      Parameters:
      scraperTargetID - id of the scraper target (required)
      scraperTargetRequest - ScraperTarget update to apply
      Returns:
      ScraperTarget updated
    • deleteScraperTarget

      void deleteScraperTarget(@Nonnull ScraperTargetResponse scraperTargetResponse)
      Delete a ScraperTarget.
      Parameters:
      scraperTargetResponse - ScraperTarget to delete
    • deleteScraperTarget

      void deleteScraperTarget(@Nonnull String scraperTargetID)
      Delete a ScraperTarget.
      Parameters:
      scraperTargetID - ID of ScraperTarget to delete
    • cloneScraperTarget

      @Nonnull ScraperTargetResponse cloneScraperTarget(@Nonnull String clonedName, @Nonnull String scraperTargetID)
      Clone a ScraperTarget.
      Parameters:
      clonedName - name of cloned ScraperTarget
      scraperTargetID - ID of ScraperTarget to clone
      Returns:
      cloned ScraperTarget
    • cloneScraperTarget

      @Nonnull ScraperTargetResponse cloneScraperTarget(@Nonnull String clonedName, @Nonnull ScraperTargetResponse scraperTargetResponse)
      Clone a ScraperTarget.
      Parameters:
      clonedName - name of cloned ScraperTarget
      scraperTargetResponse - ScraperTarget to clone
      Returns:
      cloned ScraperTarget
    • findScraperTargetByID

      @Nonnull ScraperTargetResponse findScraperTargetByID(@Nonnull String scraperTargetID)
      Retrieve a ScraperTarget.
      Parameters:
      scraperTargetID - ID of ScraperTarget to get
      Returns:
      ScraperTarget details
    • findScraperTargets

      @Nonnull List<ScraperTargetResponse> findScraperTargets()
      Get all scraper targets.
      Returns:
      List all ScraperTargets
    • findScraperTargetsByOrg

      @Nonnull List<ScraperTargetResponse> findScraperTargetsByOrg(@Nonnull Organization organization)
      Get all scraper targets.
      Parameters:
      organization - specifies the organization of the resource
      Returns:
      all scraper targets
    • findScraperTargetsByOrgId

      @Nonnull List<ScraperTargetResponse> findScraperTargetsByOrgId(@Nullable String orgID)
      Get all scraper targets.
      Parameters:
      orgID - specifies the organization ID of the resource
      Returns:
      all scraper targets
    • getMembers

      @Nonnull List<ResourceMember> getMembers(@Nonnull ScraperTargetResponse scraperTargetResponse)
      List all users with member privileges for a ScraperTarget.
      Parameters:
      scraperTargetResponse - the ScraperTarget with members
      Returns:
      return the list all users with member privileges for a ScraperTarget
    • getMembers

      @Nonnull List<ResourceMember> getMembers(@Nonnull String scraperTargetID)
      List all users with member privileges for a ScraperTarget.
      Parameters:
      scraperTargetID - ID of ScraperTarget to get members
      Returns:
      return the list all users with member privileges for a ScraperTarget
    • addMember

      @Nonnull ResourceMember addMember(@Nonnull User member, @Nonnull ScraperTargetResponse scraperTargetResponse)
      Add the scraperTarget member.
      Parameters:
      member - the member of an ScraperTarget
      scraperTargetResponse - the ScraperTarget for the member
      Returns:
      created mapping
    • addMember

      @Nonnull ResourceMember addMember(@Nonnull String memberID, @Nonnull String scraperTargetID)
      Add the ScraperTarget member.
      Parameters:
      memberID - the ID of a member
      scraperTargetID - the ID of a ScraperTarget
      Returns:
      created mapping
    • deleteMember

      void deleteMember(@Nonnull User member, @Nonnull ScraperTargetResponse scraperTargetResponse)
      Removes a member from a ScraperTarget.
      Parameters:
      member - the member of a ScraperTarget
      scraperTargetResponse - the scraperTarget
    • deleteMember

      void deleteMember(@Nonnull String memberID, @Nonnull String scraperTargetID)
      Removes a member from a ScraperTarget.
      Parameters:
      memberID - the ID of a member
      scraperTargetID - the ID of a ScraperTarget
    • getOwners

      @Nonnull List<ResourceOwner> getOwners(@Nonnull ScraperTargetResponse scraperTargetResponse)
      List all owners of a ScraperTarget.
      Parameters:
      scraperTargetResponse - the ScraperTarget with owners
      Returns:
      return List all owners of a ScraperTarget.
    • getOwners

      @Nonnull List<ResourceOwner> getOwners(@Nonnull String scraperTargetID)
      List all owners of a ScraperTarget.
      Parameters:
      scraperTargetID - ID of ScraperTarget to get owners
      Returns:
      return List all owners of a ScraperTarget
    • addOwner

      @Nonnull ResourceOwner addOwner(@Nonnull User owner, @Nonnull ScraperTargetResponse scraperTargetResponse)
      Add the ScraperTarget owner.
      Parameters:
      owner - the owner of a ScraperTarget
      scraperTargetResponse - the ScraperTarget
      Returns:
      created mapping
    • addOwner

      @Nonnull ResourceOwner addOwner(@Nonnull String ownerID, @Nonnull String scraperTargetID)
      Add the ScraperTarget owner.
      Parameters:
      ownerID - the ID of a owner
      scraperTargetID - the ID of a ScraperTarget
      Returns:
      created mapping
    • deleteOwner

      void deleteOwner(@Nonnull User owner, @Nonnull ScraperTargetResponse scraperTargetResponse)
      Removes a owner from a ScraperTarget.
      Parameters:
      owner - the owner of a ScraperTarget
      scraperTargetResponse - the scraperTarget
    • deleteOwner

      void deleteOwner(@Nonnull String ownerID, @Nonnull String scraperTargetID)
      Removes a owner from a ScraperTarget.
      Parameters:
      ownerID - the ID of a owner
      scraperTargetID - the ID of a ScraperTarget
    • getLabels

      @Nonnull List<Label> getLabels(@Nonnull ScraperTargetResponse scraperTargetResponse)
      List all labels of a ScraperTarget.
      Parameters:
      scraperTargetResponse - the ScraperTarget with labels
      Returns:
      return List all labels of a ScraperTarget.
    • getLabels

      @Nonnull List<Label> getLabels(@Nonnull String scraperTargetID)
      List all labels of a ScraperTarget.
      Parameters:
      scraperTargetID - ID of ScraperTarget to get labels
      Returns:
      return List all labels of a ScraperTarget
    • addLabel

      @Nonnull LabelResponse addLabel(@Nonnull Label label, @Nonnull ScraperTargetResponse scraperTargetResponse)
      Add the ScraperTarget label.
      Parameters:
      label - the label of a ScraperTarget
      scraperTargetResponse - the ScraperTarget
      Returns:
      added label
    • addLabel

      @Nonnull LabelResponse addLabel(@Nonnull String labelID, @Nonnull String scraperTargetID)
      Add the ScraperTarget label.
      Parameters:
      labelID - the ID of a label
      scraperTargetID - the ID of a ScraperTarget
      Returns:
      added label
    • deleteLabel

      void deleteLabel(@Nonnull Label label, @Nonnull ScraperTargetResponse scraperTargetResponse)
      Removes a label from a ScraperTarget.
      Parameters:
      label - the label of a ScraperTarget
      scraperTargetResponse - the ScraperTarget
    • deleteLabel

      void deleteLabel(@Nonnull String labelID, @Nonnull String scraperTargetID)
      Removes a label from a ScraperTarget.
      Parameters:
      labelID - the ID of a Label
      scraperTargetID - the ID of a ScraperTarget