porkbun 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -5
- data/lib/porkbun/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfab2dd7301e980ef4e44f2db8579b6797cf18371863b295d904ba1129720b31
|
4
|
+
data.tar.gz: 18c9df86bbbf47ad1a7cf4d9c2805a63195f17ee87edb79abb95492ca82023af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
13
|
-
|
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.
|
data/lib/porkbun/version.rb
CHANGED