files.com 1.1.186 → 1.1.188
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 +4 -4
- data/README.md +73 -24
- data/_VERSION +1 -1
- data/docs/user.md +1 -1
- data/lib/files.com/errors.rb +1 -0
- data/lib/files.com/models/user.rb +1 -1
- data/lib/files.com/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 436982bd53cec725451211974fd0b03bf5bac4e828386e4c6747d722e4f89680
|
4
|
+
data.tar.gz: 495052e1e6d4a0bf7eccadc884742170164da9aa79bb346d9b22c5488655ac2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cd6d5b6fae5c067743d28e15f3916277d8eae5964685a68c5d0380bb80ef9b6dabc599c9166adb9262eaf4617985be81615c6bcfe49c1594daa20f5ad53b198
|
7
|
+
data.tar.gz: 2f0e629d1d9dca0309a91fd09e881f6c0baa682b8d91c2aa564a8206cc04e24ea5b126c7e46edd36be3b3ec270ff8f169141398e0fa79e4c09ac2ac75f4885df
|
data/README.md
CHANGED
@@ -345,6 +345,7 @@ Files::FolderAdminPermissionRequiredError -> Files::NotAuthorizedError -> Files:
|
|
345
345
|
|`InvalidFilterAliasCombinationError`| `BadRequestError` |
|
346
346
|
|`InvalidFilterFieldError`| `BadRequestError` |
|
347
347
|
|`InvalidFilterParamError`| `BadRequestError` |
|
348
|
+
|`InvalidFilterParamFormatError`| `BadRequestError` |
|
348
349
|
|`InvalidFilterParamValueError`| `BadRequestError` |
|
349
350
|
|`InvalidInputEncodingError`| `BadRequestError` |
|
350
351
|
|`InvalidInterfaceError`| `BadRequestError` |
|
@@ -499,25 +500,7 @@ Files::FolderAdminPermissionRequiredError -> Files::NotAuthorizedError -> Files:
|
|
499
500
|
|`TrialLockedError`| `SiteConfigurationError` |
|
500
501
|
|`UserRequestsEnabledRequiredError`| `SiteConfigurationError` |
|
501
502
|
|
502
|
-
##
|
503
|
-
|
504
|
-
Files.com publishes a Files.com API server, which is useful for testing your use of the Files.com
|
505
|
-
SDKs and other direct integrations against the Files.com API in an integration test environment.
|
506
|
-
|
507
|
-
It is a Ruby app that operates as a minimal server for the purpose of testing basic network
|
508
|
-
operations and JSON encoding for your SDK or API client. It does not maintain state and it does not
|
509
|
-
deeply inspect your submissions for correctness.
|
510
|
-
|
511
|
-
Eventually we will add more features intended for integration testing, such as the ability to
|
512
|
-
intentionally provoke errors.
|
513
|
-
|
514
|
-
Download the server as a Docker image via [Docker Hub](https://hub.docker.com/r/filescom/files-mock-server).
|
515
|
-
|
516
|
-
The Source Code is also available on [GitHub](https://github.com/Files-com/files-mock-server).
|
517
|
-
|
518
|
-
A README is available on the GitHub link.
|
519
|
-
|
520
|
-
## File/Folder Operations
|
503
|
+
## Examples
|
521
504
|
|
522
505
|
The Files::File and Files::Dir models implement the standard Ruby API
|
523
506
|
for File and Dir, respectively. (Note that the Files.com SDK uses the
|
@@ -526,11 +509,15 @@ Files::Folder).
|
|
526
509
|
|
527
510
|
### Upload
|
528
511
|
|
512
|
+
#### Upload a File
|
513
|
+
|
529
514
|
```ruby
|
530
|
-
|
531
|
-
|
515
|
+
Files::File.upload_file("local.txt", "remote.txt")
|
516
|
+
```
|
517
|
+
|
518
|
+
#### Upload Raw File Data
|
532
519
|
|
533
|
-
|
520
|
+
```ruby
|
534
521
|
File.open("local.txt") do |local_file|
|
535
522
|
Files::File.open("remote.txt", "w") do |remote_file|
|
536
523
|
remote_file.write(local_file.read)
|
@@ -538,16 +525,78 @@ File.open("local.txt") do |local_file|
|
|
538
525
|
end
|
539
526
|
```
|
540
527
|
|
528
|
+
#### Create a Folder
|
529
|
+
|
530
|
+
```ruby
|
531
|
+
Files::Folder.create("path/to/folder/to/be/created",
|
532
|
+
mkdir_parents: true
|
533
|
+
)
|
534
|
+
```
|
535
|
+
|
541
536
|
### Download
|
542
537
|
|
538
|
+
#### Download a File
|
539
|
+
|
543
540
|
```ruby
|
544
|
-
Files::File.
|
541
|
+
Files::File.download_file("remote.txt", "local.txt")
|
545
542
|
```
|
546
543
|
|
547
544
|
### List
|
548
545
|
|
546
|
+
#### List Folder Contents
|
547
|
+
|
549
548
|
```ruby
|
550
|
-
Files::Folder.list_for("/").each do |file|
|
549
|
+
Files::Folder.list_for("remote/path/to/folder/").each do |file|
|
551
550
|
puts file.path
|
552
551
|
end
|
553
552
|
```
|
553
|
+
|
554
|
+
### Copy
|
555
|
+
|
556
|
+
The copy method works for both files and folders.
|
557
|
+
|
558
|
+
```ruby
|
559
|
+
file = Files::File.new("source/path")
|
560
|
+
file.copy(destination: "destination/path")
|
561
|
+
```
|
562
|
+
|
563
|
+
### Move
|
564
|
+
|
565
|
+
The move method works for both files and folders.
|
566
|
+
|
567
|
+
```ruby
|
568
|
+
file = Files::File.new("source/path")
|
569
|
+
file.move(destination: "destination/path")
|
570
|
+
```
|
571
|
+
|
572
|
+
### Delete
|
573
|
+
|
574
|
+
The delete method works for both files and folders.
|
575
|
+
|
576
|
+
```ruby
|
577
|
+
Files::File.delete("path/to/file/or/folder")
|
578
|
+
```
|
579
|
+
|
580
|
+
In case the folder is not empty, you can use the `recursive` argument:
|
581
|
+
|
582
|
+
```ruby
|
583
|
+
Files::File.delete("path/to/folder", recursive: true)
|
584
|
+
```
|
585
|
+
|
586
|
+
## Mock Server
|
587
|
+
|
588
|
+
Files.com publishes a Files.com API server, which is useful for testing your use of the Files.com
|
589
|
+
SDKs and other direct integrations against the Files.com API in an integration test environment.
|
590
|
+
|
591
|
+
It is a Ruby app that operates as a minimal server for the purpose of testing basic network
|
592
|
+
operations and JSON encoding for your SDK or API client. It does not maintain state and it does not
|
593
|
+
deeply inspect your submissions for correctness.
|
594
|
+
|
595
|
+
Eventually we will add more features intended for integration testing, such as the ability to
|
596
|
+
intentionally provoke errors.
|
597
|
+
|
598
|
+
Download the server as a Docker image via [Docker Hub](https://hub.docker.com/r/filescom/files-mock-server).
|
599
|
+
|
600
|
+
The Source Code is also available on [GitHub](https://github.com/Files-com/files-mock-server).
|
601
|
+
|
602
|
+
A README is available on the GitHub link.
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.188
|
data/docs/user.md
CHANGED
@@ -167,7 +167,7 @@ Files::User.list(
|
|
167
167
|
|
168
168
|
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
169
169
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
170
|
-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `
|
170
|
+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `name`, `company`, `password_validity_days`, `ssl_required` or `username`.
|
171
171
|
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]` and `[ company, name ]`.
|
172
172
|
* `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
173
173
|
* `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
data/lib/files.com/errors.rb
CHANGED
@@ -61,6 +61,7 @@ module Files
|
|
61
61
|
class InvalidFilterAliasCombinationError < BadRequestError; end
|
62
62
|
class InvalidFilterFieldError < BadRequestError; end
|
63
63
|
class InvalidFilterParamError < BadRequestError; end
|
64
|
+
class InvalidFilterParamFormatError < BadRequestError; end
|
64
65
|
class InvalidFilterParamValueError < BadRequestError; end
|
65
66
|
class InvalidInputEncodingError < BadRequestError; end
|
66
67
|
class InvalidInterfaceError < BadRequestError; end
|
@@ -836,7 +836,7 @@ module Files
|
|
836
836
|
# Parameters:
|
837
837
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
838
838
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
839
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `
|
839
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `name`, `company`, `password_validity_days`, `ssl_required` or `username`.
|
840
840
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]` and `[ company, name ]`.
|
841
841
|
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
842
842
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
data/lib/files.com/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: files.com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.188
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|