hs_restclient.endpoints package¶
Submodules¶
hs_restclient.endpoints.resources module¶
-
class
hs_restclient.endpoints.resources.
FunctionsSubEndpoint
(hs, pid)[source]¶ Bases:
object
-
move_or_rename
(payload)[source]¶ Moves or renames a file
Parameters: payload – source_path: string target_path: string Returns: (object) target_rel_path: tgt_path
-
rep_res_bag_to_irods_user_zone
()[source]¶ Replicate data bag to iRODS user zone.
- param payload:
- zip_with_rel_path: string remove_original_zip: boolean
Returns: (object) unzipped_path: string
-
set_file_type
(payload)[source]¶ Sets a file to a specific HydroShare file type (e.g. NetCDF, GeoRaster, GeoFeature etc)
Parameters: payload – file_path: string (relative path of the file to be set to a specific file type) hs_file_type: string (one of the supported files types: SingleFile, NetCDF, GeoRaster, RefTimeseries, TimeSeries and GeoFeature) Returns: (object) message: string
-
-
class
hs_restclient.endpoints.resources.
ResourceEndpoint
(hs, pid)[source]¶ Bases:
hs_restclient.endpoints.resources.BaseEndpoint
-
files
(payload)[source]¶ Upload a file to a hydroshare resource.
Parameters: payload – file: File object to upload to server folder: folder path to upload the file to Returns: json object resource_id: string resource id, file_name: string name of file
-
flag
(payload)[source]¶ Set a single flag on a resource.
Parameters: payload – t: can be one of make_public, make_private, make_shareable, make_not_shareable, make_discoverable, make_not_discoverable Returns: empty but with 202 status_code
Pass through helper function for flag function.
-