Class: AxTrack::AssetResource
- Defined in:
- lib/ax_track/resources/asset_resource.rb
Constant Summary
Constants inherited from Resource
Resource::ApiError, Resource::ApiRequestsQuotaReachedError, Resource::BadRequestError, Resource::ForbiddenError, Resource::GithubAPIError, Resource::HTTP_BAD_REQUEST_CODE, Resource::HTTP_FORBIDDEN_CODE, Resource::HTTP_NOT_FOUND_CODE, Resource::HTTP_OK_CODE, Resource::HTTP_UNAUTHORIZED_CODE, Resource::HTTP_UNPROCESSABLE_ENTITY_CODE, Resource::NotFoundError, Resource::UnauthorizedError, Resource::UnprocessableEntityError
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
- #list(per_page: nil, cursor: nil) ⇒ Object
- #retrieve(asset_id) ⇒ Object
- #update(asset_id, **attributes) ⇒ Object
Methods inherited from Resource
#error_class, #initialize, #request, #response_successful?
Constructor Details
This class inherits a constructor from AxTrack::Resource
Instance Method Details
#list(per_page: nil, cursor: nil) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/ax_track/resources/asset_resource.rb', line 4 def list(per_page: nil, cursor: nil) Collection.from_response response = request(endpoint: "assets", params: {per_page: per_page, cursor: cursor}.compact), key: 'results', type: Asset end |