base-api-io 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: a02da5f699199bf93cd13504ad4bde5a881560f371882d99252c6fc35d1db5f1
4
- data.tar.gz: 4e000f8d5d22569f148e91501d75c5dffedf0703b8c62a4c71653dd219cb6ff5
2
+ SHA1:
3
+ metadata.gz: d7d60f3e18c1ce77a3bbae93148f618ce96c108b
4
+ data.tar.gz: 8500d9a7d88a287734e378d4046842891dddcefb
5
5
  SHA512:
6
- metadata.gz: fd672ebc77dea2de4467a9842fc576ea9acd9a72d7bd1c485862f91c3622f372c0111d74c452b0eb51ce5db815279289e96a569f0254c4cff4ff7e649cebd459
7
- data.tar.gz: e039551f3bc6f7f6c808c0021b45ef1b1cb9ec3a0fa26b9c9de76fb8f2d128cad5577c9f460cb676af827e60ee2a273ac42c3301bdecdb043fa0263af5c6c1fd
6
+ metadata.gz: eda59767a1eb34e70c8edeff55160dca1cb611d68608421be333d894801dc4c9f5adff75a7e399f2a67e4bb129f1193d7f7fd4a41c091ad074d27744986f8c83
7
+ data.tar.gz: 4ffa1ba4e925c830a302dbcbe6eda94dcea836e3c88927a0142182dcc573d8164927b462d016a423d12d6fe62da34cae00111865f009f878f010c8bcd68587ff
data/README.md CHANGED
@@ -59,6 +59,11 @@ email =
59
59
  Using the `users` endpoint on the client you can create / get or delete users:
60
60
 
61
61
  ```ruby
62
+ # List users
63
+ users = client.users.list(page: 1, per_page: 10)
64
+ users.items # The array of users
65
+ users.metadata # The metadata object containing the total count
66
+
62
67
  # Create a user with email / password
63
68
  user =
64
69
  client.users.create(
@@ -110,6 +115,11 @@ Using the `files` endpoint on the client you can create / get / delete or
110
115
  download files:
111
116
 
112
117
  ```ruby
118
+ # List files
119
+ files = client.files.list(page: 1, per_page: 10)
120
+ files.items # The array of files
121
+ files.metadata # The metadata object containing the total count
122
+
113
123
  # Create a file
114
124
  file =
115
125
  client.files.create(
@@ -140,6 +150,11 @@ Using the `images` endpoint on the client you can create / get / delete or
140
150
  process images:
141
151
 
142
152
  ```ruby
153
+ # List images
154
+ images = client.images.list(page: 1, per_page: 10)
155
+ images.items # The array of images
156
+ images.metadata # The metadata object containing the total count
157
+
143
158
  # Create an image
144
159
  image =
145
160
  client.images.create(
@@ -10,6 +10,16 @@ module Base
10
10
  super
11
11
  end
12
12
 
13
+ # Lists the files of a project
14
+ def list(page: 1, per_page: 10)
15
+ request do
16
+ response =
17
+ connection.get('', per_page: per_page, page: page)
18
+
19
+ parse(response.body)
20
+ end
21
+ end
22
+
13
23
  # Uploads the given file and returns its metadata.
14
24
  def create(path:, type:, filename:)
15
25
  request do
@@ -10,6 +10,16 @@ module Base
10
10
  super
11
11
  end
12
12
 
13
+ # Lists the files of a project
14
+ def list(page: 1, per_page: 10)
15
+ request do
16
+ response =
17
+ connection.get('', per_page: per_page, page: page)
18
+
19
+ parse(response.body)
20
+ end
21
+ end
22
+
13
23
  # Uploads the given image and returns its metadata.
14
24
  #
15
25
  # Only images with ImageMagick understands can be uploaded otherwise it
@@ -10,6 +10,16 @@ module Base
10
10
  super
11
11
  end
12
12
 
13
+ # Lists the files of a project
14
+ def list(page: 1, per_page: 10)
15
+ request do
16
+ response =
17
+ connection.get('', per_page: per_page, page: page)
18
+
19
+ parse(response.body)
20
+ end
21
+ end
22
+
13
23
  # Creates a user with the given credentials.
14
24
  def create(email:, password:, confirmation:)
15
25
  request do
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Base
4
- VERSION = '1.0.0'
4
+ VERSION = '1.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base-api-io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusztáv Szikszai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-21 00:00:00.000000000 Z
11
+ date: 2019-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -145,7 +145,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
- rubygems_version: 3.0.3
148
+ rubyforge_project:
149
+ rubygems_version: 2.4.8
149
150
  signing_key:
150
151
  specification_version: 4
151
152
  summary: Ruby client library for the Base API