pinata 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b58adb3eac2c345d9c010d8dda02f38e7a8963501dc951e8e211ae506862ad6
4
- data.tar.gz: 3e63495aae0b3713ed43b3194e09273ebb3b1f8a853b5dedd25e736f7a2485d1
3
+ metadata.gz: a0a9879fee6499a5a8bb55ea67b69cd1cb0ef136a7748841049c908de465af6f
4
+ data.tar.gz: d34b4c1fc55c1f66d74a045ebf41606e48ad4d4790416ab77dfb28bda7e6fb02
5
5
  SHA512:
6
- metadata.gz: 8d75e436576b230350bbe0a0f3d19304ecebe1ff6ad336aa0e6d0960e46cc0b8a25e03900322a5b6f97cc4856dc3841dad84155170179ac249c74e9444d7c942
7
- data.tar.gz: 5e01a7b68ebe411720ebdd969a01088894d7d29e8827981df4dbc2bc95cf4ab3778387896a2a0a15fd94aa16d1c56995ee8f33dd265355ef9668f259780a4b72
6
+ metadata.gz: 3e039bd3ddba7aef2bad8dfd9d58eb26ce33806ccabdb5fca4b18bfbe1fb03fa1efeae145817e8dc65f991ec03918d3dddd06c16d0751760a6aeba68d14c9e3f
7
+ data.tar.gz: 3e5bcc8497d0306f4f8b5d80a802cf62e787cb77a59c44053cf69d4c8f85db553fb0dcba424fcc6b3914aab254fc3a3b106dcb48b5e03b5c6a12cc1b4956a488
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Pinata
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/pinata.svg)](https://badge.fury.io/rb/pinata)
3
4
  [![Build Status](https://github.com/onyxmueller/pinata-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/onyxmueller/pinata-ruby/actions/workflows/build.yml)
4
5
 
5
6
  ![header](https://docs.mypinata.cloud/ipfs/QmP9PGe3PdUqmsq8xY4sEW3qgdXx4WT9ictTWCb3qyzz3s?img-format=webp)
@@ -82,7 +83,8 @@ client.authentication.test
82
83
  client.files.upload(file: "/path/to/file")
83
84
  client.files.list
84
85
  client.files.list("metadata[key]": "value")
85
- client.files.update(file_id: "thefileid", "name": "thenameoffile")
86
+ client.files.get(file_id: "1234567890")
87
+ client.files.update(file_id: "thefilesid", "name": "thenameoffile")
86
88
  client.files.sign("gateway": "yourgatewaydomain", "file_cid": "thefilecid", "expires": 500000)
87
89
  ```
88
90
 
@@ -16,6 +16,10 @@ module Pinata
16
16
  Collection.from_response(response, key: "files", type: File)
17
17
  end
18
18
 
19
+ def get(file_id:)
20
+ File.new api_get_request("files/#{file_id}").body.dig("data")
21
+ end
22
+
19
23
  def sign(gateway:, file_cid:, expires:, date: Time.now.to_i,
20
24
  url_method: "GET")
21
25
  payload = {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pinata
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinata
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Onyx Mueller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-18 00:00:00.000000000 Z
11
+ date: 2024-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday