#require 'helix_web_services_client/models' require 'open-uri' class HelixWebServicesClient def sync_projects(members: nil) args = {} args['members'] = members if members arr = execute_method_no_body(:get, '/sync/v1/projects', args) arr.map { |x| Models::Project.from_hash(x) } end def sync_project(project_id) obj = execute_method_no_body(:get, "/sync/v1/projects/#{URI.encode(project_id)}") Models::Project.from_hash(obj) end def create_sync_project(project) project = Models::Project.from_hash(project) unless project.is_a?(Models::Project) updated = execute_method_with_body(:post, "/sync/v1/projects", project.to_h) Models::Project.from_hash(updated) end def update_sync_project(project) project = Models::Project.from_hash(project) unless project.is_a?(Models::Project) updated = execute_method_with_body(:patch, "/sync/v1/projects/#{URI.encode(project.id)}", project.to_h) Models::Project.from_hash(updated) end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 15222 | tjuricek |
Revise server specs testing and documentation. Note: also fixed issues with setting P4PORT via headers. For whatever reason, the host setting doesn't seem to work like I expect it to, though P4PORT works just fine. |
||
#2 | 15077 | tjuricek |
Add new 'model' technique, revised branch spec operations, test Auth::Middleware. The Ruby client now does *not* strictly type anything, but extends OpenStruct with helper methods to help deal with inconsistent data formats. See the OpenModel class documentation for more details. The Auth::Middleware class is also *finally* implemented as well. This does not take into account all possible variations of server behavior (yet), but that will happen in follow-up work. |
||
#1 | 13941 | tjuricek |
Re-implemented the sync project methods at the HTTP level. The Qt API is missing the "members" concept, but it's likely not quite usable just yet. It's existing logic does work, however. |