porkbun 0.2.0 → 0.2.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -5
  3. data/lib/porkbun/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ece7707cda5e00c01e1f602dead38c53b0cfa7bc855bca379d1b49ed964d9edd
4
- data.tar.gz: c6732f1843cc0a4e92875d8205160c35003c341abd34de9c08887aaedf0fd693
3
+ metadata.gz: bfab2dd7301e980ef4e44f2db8579b6797cf18371863b295d904ba1129720b31
4
+ data.tar.gz: 18c9df86bbbf47ad1a7cf4d9c2805a63195f17ee87edb79abb95492ca82023af
5
5
  SHA512:
6
- metadata.gz: 9d3dcde1ed269afa5074308b79e0640be5982655e365d6586ab4f88b4b90db0a17471b21817e28a2f1addbaa2b17a015522ee87f29afe0043306fc3592a66725
7
- data.tar.gz: 29a28d2cd653560dfb169ecb835a44c5f85f6ba7ffe5e05a910a8a503ea470fbee559681a266387219b81524c93aa2447ab1c07c86db90695f7e45f323bdc14d
6
+ metadata.gz: 9fd355b2102b8ad2352e6e389c103877e3b4cea191d4d88420be4f6460755b30541ee67def037bed4b9f0192b5e6afa8b84bc5fd3df3e77059e37ec67ee8cd45
7
+ data.tar.gz: 1f1b61ce3edb87a0d846c8f7e5089d4d02619e9bf07334c8b9da93903a424650eed89416e057199a4250a72fa88590262d354b79069b7086ca3a10bebe9d1f2d
data/README.md CHANGED
@@ -9,15 +9,50 @@ Reference: https://porkbun.com/api/json/v3/documentation
9
9
  ## Usage
10
10
 
11
11
  ```ruby
12
- Porkbun.API_KEY = 'YOUR_API_KEY'
13
- Porkbun.SECRET_API_KEY = 'YOUR_SECRET_API_KEY'
12
+ ENV['PORKBUN_API_KEY'] = 'YOUR_API_KEY'
13
+ ENV['PORKBUN_SECRET_API_KEY'] = 'YOUR_SECRET_API_KEY'
14
14
  record = Porkbun::DNS.create(name: 'test',
15
- type: 'A',
16
- content: '1.1.1.1',
17
- ttl: 300
15
+ type: 'A',
16
+ content: '1.1.1.1',
17
+ ttl: 300
18
18
  )
19
19
  ```
20
20
 
21
+ ## API
22
+
23
+ ### `Porkbun::Domain.ping`
24
+
25
+ Make sure your keys are good.
26
+
27
+ ### `Porkbun::DNS.retrieve(domain, id)`
28
+
29
+ Retrive all or specific record for a domain
30
+
31
+ ### `Porkbun::DNS.create(options)`
32
+
33
+ Create record for a domain
34
+
35
+ options:
36
+ - `name` - name of record. example `www`
37
+ - `type` - record type. example: CNAME
38
+ - `content` - content of record. example '1.1.1.1',
39
+ - `ttl` - time to live. example: 600. porkbun seems to have this as a minimum
40
+ - `prio` - record priority. mainly for MX records. example 10.
41
+
42
+ returns instance of DNS which can be used to delete
43
+
44
+ ## CLI
45
+
46
+ The gem also comes with a CLI
47
+
48
+ $ porkbun
49
+ Commands:
50
+ porkbun delete_all <domain> # deletes all records for a domain. this is destructive. use with caution
51
+ porkbun help [COMMAND] # Describe available commands or one specific command
52
+ porkbun import <file> # Import BIND zone file
53
+ porkbun list # List all domains
54
+ porkbun retrieve <domain> [<id>] # List all records for a domain
55
+
21
56
  ## Development
22
57
 
23
58
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Porkbun
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: porkbun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bretoi