metatron_ruby_client 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +140 -0
- data/config.json +13 -0
- data/docs/Asset.md +9 -0
- data/docs/AssetAttributes.md +8 -0
- data/docs/AssetData.md +10 -0
- data/docs/AssetMeta.md +8 -0
- data/docs/AssetResultSet.md +10 -0
- data/docs/AssetResultSetMeta.md +8 -0
- data/docs/DefaultApi.md +631 -0
- data/docs/Error.md +10 -0
- data/docs/Errors.md +8 -0
- data/docs/Item.md +9 -0
- data/docs/ItemData.md +8 -0
- data/docs/ItemResultSet.md +10 -0
- data/docs/Links.md +10 -0
- data/docs/Manifestation.md +9 -0
- data/docs/ManifestationAttributes.md +11 -0
- data/docs/ManifestationData.md +11 -0
- data/docs/ManifestationRelationships.md +10 -0
- data/docs/ManifestationResultSet.md +10 -0
- data/docs/Meta.md +10 -0
- data/docs/OneToManyRelationship.md +10 -0
- data/docs/OneToOneRelationship.md +10 -0
- data/docs/Resource.md +10 -0
- data/docs/ResourceData.md +11 -0
- data/docs/ResourceLink.md +9 -0
- data/docs/ResultSetMeta.md +10 -0
- data/docs/Work.md +9 -0
- data/docs/WorkAttributes.md +8 -0
- data/docs/WorkData.md +11 -0
- data/docs/WorkRelationships.md +8 -0
- data/docs/WorkResultSet.md +11 -0
- data/generate.sh +0 -0
- data/git_push.sh +52 -0
- data/lib/metatron_ruby_client/api/default_api.rb +727 -0
- data/lib/metatron_ruby_client/api_client.rb +361 -0
- data/lib/metatron_ruby_client/api_error.rb +34 -0
- data/lib/metatron_ruby_client/configuration.rb +170 -0
- data/lib/metatron_ruby_client/models/asset.rb +195 -0
- data/lib/metatron_ruby_client/models/asset_attributes.rb +212 -0
- data/lib/metatron_ruby_client/models/asset_data.rb +208 -0
- data/lib/metatron_ruby_client/models/asset_meta.rb +198 -0
- data/lib/metatron_ruby_client/models/asset_result_set.rb +202 -0
- data/lib/metatron_ruby_client/models/asset_result_set_meta.rb +196 -0
- data/lib/metatron_ruby_client/models/error.rb +208 -0
- data/lib/metatron_ruby_client/models/errors.rb +184 -0
- data/lib/metatron_ruby_client/models/item.rb +197 -0
- data/lib/metatron_ruby_client/models/item_data.rb +186 -0
- data/lib/metatron_ruby_client/models/item_result_set.rb +206 -0
- data/lib/metatron_ruby_client/models/links.rb +204 -0
- data/lib/metatron_ruby_client/models/manifestation.rb +197 -0
- data/lib/metatron_ruby_client/models/manifestation_attributes.rb +209 -0
- data/lib/metatron_ruby_client/models/manifestation_data.rb +235 -0
- data/lib/metatron_ruby_client/models/manifestation_relationships.rb +200 -0
- data/lib/metatron_ruby_client/models/manifestation_result_set.rb +214 -0
- data/lib/metatron_ruby_client/models/meta.rb +260 -0
- data/lib/metatron_ruby_client/models/one_to_many_relationship.rb +206 -0
- data/lib/metatron_ruby_client/models/one_to_one_relationship.rb +204 -0
- data/lib/metatron_ruby_client/models/resource.rb +281 -0
- data/lib/metatron_ruby_client/models/resource_data.rb +221 -0
- data/lib/metatron_ruby_client/models/resource_link.rb +199 -0
- data/lib/metatron_ruby_client/models/result_set_meta.rb +203 -0
- data/lib/metatron_ruby_client/models/work.rb +197 -0
- data/lib/metatron_ruby_client/models/work_attributes.rb +186 -0
- data/lib/metatron_ruby_client/models/work_data.rb +235 -0
- data/lib/metatron_ruby_client/models/work_relationships.rb +182 -0
- data/lib/metatron_ruby_client/models/work_result_set.rb +213 -0
- data/lib/metatron_ruby_client/version.rb +13 -0
- data/lib/metatron_ruby_client.rb +60 -0
- data/metatron_ruby_client.gemspec +31 -0
- data/spec/api/default_api_spec.rb +218 -0
- data/spec/models/asset_attributes_spec.rb +46 -0
- data/spec/models/asset_data_spec.rb +66 -0
- data/spec/models/asset_meta_spec.rb +46 -0
- data/spec/models/asset_result_set_spec.rb +66 -0
- data/spec/models/asset_spec.rb +56 -0
- data/spec/models/error_spec.rb +66 -0
- data/spec/models/errors_spec.rb +46 -0
- data/spec/models/item_data_spec.rb +46 -0
- data/spec/models/item_result_set_spec.rb +66 -0
- data/spec/models/item_spec.rb +56 -0
- data/spec/models/links_spec.rb +66 -0
- data/spec/models/manifestation_attributes_spec.rb +76 -0
- data/spec/models/manifestation_data_spec.rb +76 -0
- data/spec/models/manifestation_relationships_spec.rb +66 -0
- data/spec/models/manifestation_result_set_spec.rb +66 -0
- data/spec/models/manifestation_spec.rb +56 -0
- data/spec/models/meta_spec.rb +66 -0
- data/spec/models/one_to_many_relationship_spec.rb +66 -0
- data/spec/models/one_to_one_relationship_spec.rb +66 -0
- data/spec/models/resource_data_spec.rb +76 -0
- data/spec/models/resource_link_spec.rb +56 -0
- data/spec/models/resource_spec.rb +66 -0
- data/spec/models/result_set_meta_spec.rb +66 -0
- data/spec/models/work_attributes_spec.rb +46 -0
- data/spec/models/work_data_spec.rb +76 -0
- data/spec/models/work_relationships_spec.rb +46 -0
- data/spec/models/work_result_set_spec.rb +76 -0
- data/spec/models/work_spec.rb +56 -0
- data/stub-service/.swagger-codegen-ignore +23 -0
- data/stub-service/Gemfile +4 -0
- data/stub-service/Gemfile.lock +22 -0
- data/stub-service/LICENSE +201 -0
- data/stub-service/README.md +29 -0
- data/stub-service/api/default_api.rb +370 -0
- data/stub-service/config.ru +2 -0
- data/stub-service/lib/result_set.rb +37 -0
- data/stub-service/lib/swaggering.rb +163 -0
- data/stub-service/my_app.rb +13 -0
- data/stub-service/responses/works/includes/manifestations.assets.yaml +42 -0
- data/stub-service/responses/works/includes/manifestations.yaml +88 -0
- data/stub-service/responses/works/result_set.yaml +18 -0
- data/stub-service/swagger.yaml +756 -0
- data/swagger-codegen-cli.jar +0 -0
- metadata +369 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: dda82d8008291b270cf2cca2d89295721b33212c
|
4
|
+
data.tar.gz: 7447040efd122f2870b370a5a1efa6b0c68198d6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 41e6d7f8ed5ed2e105afde36c8104a15b7555ac5730c86017dc8aa26bef8e8d17e9cc7376dbe43737b867b81bce5001659c5b5f798a13ec9ec2d2707ddf09ca3
|
7
|
+
data.tar.gz: 8509bc4aa6038f797d69e61ff0a34f28d70a075fd97a6347286532de370b777b4f51a115c5f51ef791b9d510f63b10af0648c464a8bc50d59cdb490ec740d5e2
|
data/README.md
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
# metatron_ruby_client
|
2
|
+
|
3
|
+
MetatronClient - the Ruby gem for the Metatron Server
|
4
|
+
|
5
|
+
A primitive modelling bibliographic metadata
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: 2016-07-15T09:42:29Z
|
10
|
+
- Package version: 0.0.1
|
11
|
+
- Build date: 2016-07-15T12:44:14.686+01:00
|
12
|
+
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
### Build a gem
|
17
|
+
|
18
|
+
To build the Ruby code into a gem:
|
19
|
+
|
20
|
+
```shell
|
21
|
+
gem build metatron_ruby_client.gemspec
|
22
|
+
```
|
23
|
+
|
24
|
+
Then either install the gem locally:
|
25
|
+
|
26
|
+
```shell
|
27
|
+
gem install ./metatron_ruby_client-0.0.1.gem
|
28
|
+
```
|
29
|
+
(for development, run `gem install --dev ./metatron_ruby_client-0.0.1.gem` to install the development dependencies)
|
30
|
+
|
31
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
|
+
|
33
|
+
Finally add this to the Gemfile:
|
34
|
+
|
35
|
+
gem 'metatron_ruby_client', '~> 0.0.1'
|
36
|
+
|
37
|
+
### Install from Git
|
38
|
+
|
39
|
+
If the Ruby gem is hosted at a git repository: https://github.com/talis/metatron_rb, then add the following in the Gemfile:
|
40
|
+
|
41
|
+
gem 'metatron_ruby_client', :git => 'https://github.com/talis/metatron_rb.git'
|
42
|
+
|
43
|
+
### Include the Ruby code directly
|
44
|
+
|
45
|
+
Include the Ruby code directly using `-I` as follows:
|
46
|
+
|
47
|
+
```shell
|
48
|
+
ruby -Ilib script.rb
|
49
|
+
```
|
50
|
+
|
51
|
+
## Getting Started
|
52
|
+
|
53
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
54
|
+
```ruby
|
55
|
+
# Load the gem
|
56
|
+
require 'metatron_ruby_client'
|
57
|
+
|
58
|
+
# Setup authorization
|
59
|
+
MetatronClient.configure do |config|
|
60
|
+
# Configure API key authorization: Authorizer
|
61
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
62
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'BEARER' (defaults to nil)
|
63
|
+
#config.api_key_prefix['Authorization'] = 'BEARER'
|
64
|
+
end
|
65
|
+
|
66
|
+
api_instance = MetatronClient::DefaultApi.new
|
67
|
+
|
68
|
+
asset_id = "asset_id_example" # String |
|
69
|
+
|
70
|
+
asset_type = "asset_type_example" # String |
|
71
|
+
|
72
|
+
authorization = "authorization_example" # String |
|
73
|
+
|
74
|
+
|
75
|
+
begin
|
76
|
+
api_instance.2_assets_asset_type_asset_id_delete(asset_id, asset_type, authorization)
|
77
|
+
rescue MetatronClient::ApiError => e
|
78
|
+
puts "Exception when calling DefaultApi->2_assets_asset_type_asset_id_delete: #{e}"
|
79
|
+
end
|
80
|
+
|
81
|
+
```
|
82
|
+
|
83
|
+
## Documentation for API Endpoints
|
84
|
+
|
85
|
+
All URIs are relative to *https://bibliography.talis.com*
|
86
|
+
|
87
|
+
Class | Method | HTTP request | Description
|
88
|
+
------------ | ------------- | ------------- | -------------
|
89
|
+
*MetatronClient::DefaultApi* | [**2_assets_asset_type_asset_id_delete**](docs/DefaultApi.md#2_assets_asset_type_asset_id_delete) | **DELETE** /2/assets/{assetType}/{assetId} |
|
90
|
+
*MetatronClient::DefaultApi* | [**2_manifestations_get**](docs/DefaultApi.md#2_manifestations_get) | **GET** /2/manifestations |
|
91
|
+
*MetatronClient::DefaultApi* | [**2_manifestations_manifestation_id_assets_get**](docs/DefaultApi.md#2_manifestations_manifestation_id_assets_get) | **GET** /2/manifestations/{manifestationId}/assets |
|
92
|
+
*MetatronClient::DefaultApi* | [**2_manifestations_manifestation_id_assets_post**](docs/DefaultApi.md#2_manifestations_manifestation_id_assets_post) | **POST** /2/manifestations/{manifestationId}/assets |
|
93
|
+
*MetatronClient::DefaultApi* | [**2_manifestations_manifestation_id_get**](docs/DefaultApi.md#2_manifestations_manifestation_id_get) | **GET** /2/manifestations/{manifestationId} |
|
94
|
+
*MetatronClient::DefaultApi* | [**2_manifestations_manifestation_id_items_tenant_code_get**](docs/DefaultApi.md#2_manifestations_manifestation_id_items_tenant_code_get) | **GET** /2/manifestations/{manifestationId}/items/{tenantCode} |
|
95
|
+
*MetatronClient::DefaultApi* | [**2_manifestations_manifestation_id_works_get**](docs/DefaultApi.md#2_manifestations_manifestation_id_works_get) | **GET** /2/manifestations/{manifestationId}/works |
|
96
|
+
*MetatronClient::DefaultApi* | [**2_works_get**](docs/DefaultApi.md#2_works_get) | **GET** /2/works |
|
97
|
+
*MetatronClient::DefaultApi* | [**2_works_work_id_assets_get**](docs/DefaultApi.md#2_works_work_id_assets_get) | **GET** /2/works/{workId}/assets |
|
98
|
+
*MetatronClient::DefaultApi* | [**2_works_work_id_manifestations_get**](docs/DefaultApi.md#2_works_work_id_manifestations_get) | **GET** /2/works/{workId}/manifestations |
|
99
|
+
*MetatronClient::DefaultApi* | [**2_works_work_id_similar_get**](docs/DefaultApi.md#2_works_work_id_similar_get) | **GET** /2/works/{workId}/similar |
|
100
|
+
|
101
|
+
|
102
|
+
## Documentation for Models
|
103
|
+
|
104
|
+
- [MetatronClient::Asset](docs/Asset.md)
|
105
|
+
- [MetatronClient::AssetData](docs/AssetData.md)
|
106
|
+
- [MetatronClient::AssetResultSet](docs/AssetResultSet.md)
|
107
|
+
- [MetatronClient::AssetResultSetMeta](docs/AssetResultSetMeta.md)
|
108
|
+
- [MetatronClient::Error](docs/Error.md)
|
109
|
+
- [MetatronClient::Errors](docs/Errors.md)
|
110
|
+
- [MetatronClient::ItemData](docs/ItemData.md)
|
111
|
+
- [MetatronClient::ItemResultSet](docs/ItemResultSet.md)
|
112
|
+
- [MetatronClient::Links](docs/Links.md)
|
113
|
+
- [MetatronClient::ManifestationAttributes](docs/ManifestationAttributes.md)
|
114
|
+
- [MetatronClient::ManifestationData](docs/ManifestationData.md)
|
115
|
+
- [MetatronClient::ManifestationRelationships](docs/ManifestationRelationships.md)
|
116
|
+
- [MetatronClient::ManifestationResultSet](docs/ManifestationResultSet.md)
|
117
|
+
- [MetatronClient::OneToManyRelationship](docs/OneToManyRelationship.md)
|
118
|
+
- [MetatronClient::OneToOneRelationship](docs/OneToOneRelationship.md)
|
119
|
+
- [MetatronClient::ResourceData](docs/ResourceData.md)
|
120
|
+
- [MetatronClient::ResourceLink](docs/ResourceLink.md)
|
121
|
+
- [MetatronClient::ResultSetMeta](docs/ResultSetMeta.md)
|
122
|
+
- [MetatronClient::WorkAttributes](docs/WorkAttributes.md)
|
123
|
+
- [MetatronClient::WorkData](docs/WorkData.md)
|
124
|
+
- [MetatronClient::WorkRelationships](docs/WorkRelationships.md)
|
125
|
+
- [MetatronClient::WorkResultSet](docs/WorkResultSet.md)
|
126
|
+
|
127
|
+
|
128
|
+
## Documentation for Authorization
|
129
|
+
|
130
|
+
|
131
|
+
### oauth2
|
132
|
+
|
133
|
+
- **Type**: OAuth
|
134
|
+
- **Flow**: application
|
135
|
+
- **Authorization URL**:
|
136
|
+
- **Scopes**:
|
137
|
+
- su: Talis super user
|
138
|
+
- metatron:read: Read only access
|
139
|
+
- metatron:write: Write only access
|
140
|
+
|
data/config.json
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"gemName": "metatron_ruby_client",
|
3
|
+
"moduleName": "MetatronClient",
|
4
|
+
"gemVersion": "0.0.1",
|
5
|
+
"gemLicense": "Copyright Talis Education Ltd",
|
6
|
+
"gemHomepage": "https://github.com/talis/metatron_rb",
|
7
|
+
"gemSummary": "A ruby API wrapper for Metatron",
|
8
|
+
"gemDescription": "A client to utilise the bibliographic data and work set groupings in Metatron",
|
9
|
+
"gemAuthor": "Ross Singer",
|
10
|
+
"gemAuthorEmail": "rxs@talis.com",
|
11
|
+
"gitUserId": "talis",
|
12
|
+
"gitRepoId": "metatron_rb"
|
13
|
+
}
|
data/docs/Asset.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# MetatronClient::Asset
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**meta** | [**AssetResultSetMeta**](AssetResultSetMeta.md) | | [optional]
|
7
|
+
**data** | [**AssetData**](AssetData.md) | |
|
8
|
+
|
9
|
+
|
data/docs/AssetData.md
ADDED
data/docs/AssetMeta.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# MetatronClient::AssetResultSet
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**links** | [**Links**](Links.md) | | [optional]
|
7
|
+
**meta** | [**AssetResultSetMeta**](AssetResultSetMeta.md) | | [optional]
|
8
|
+
**data** | [**Array<AssetData>**](AssetData.md) | | [optional]
|
9
|
+
|
10
|
+
|