Class CurseFileInfo

java.lang.Object
fr.flowarg.flowupdater.download.json.CurseFileInfo
Direct Known Subclasses:
CurseModPackInfo

public class CurseFileInfo extends Object
This class represents a file in the CurseForge API.
  • Constructor Details

    • CurseFileInfo

      public CurseFileInfo(int projectID, int fileID)
      Construct a new CurseFileInfo object.
      Parameters:
      projectID - the ID of the project.
      fileID - the ID of the file.
  • Method Details

    • getFilesFromJson

      @NotNull public static @NotNull List<CurseFileInfo> getFilesFromJson(URL jsonUrl)
      Retrieve a collection of CurseFileInfo by parsing a remote JSON file.
      Parameters:
      jsonUrl - the url of the remote JSON file.
      Returns:
      a collection of CurseFileInfo.
    • getFilesFromJson

      @NotNull public static @NotNull List<CurseFileInfo> getFilesFromJson(String jsonUrl)
      Retrieve a collection of CurseFileInfo by parsing a remote JSON file.
      Parameters:
      jsonUrl - the url of the remote JSON file.
      Returns:
      a collection of CurseFileInfo.
    • getProjectID

      public int getProjectID()
      Get the project ID.
      Returns:
      the project ID.
    • getFileID

      public int getFileID()
      Get the file ID.
      Returns:
      the file ID.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object