porkbun 0.2.0 → 0.2.2
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 +40 -5
- data/lib/porkbun/version.rb +1 -1
- data/lib/porkbun.rb +0 -1
- metadata +1 -2
- data/sig/porkbun.rbs +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aebfa2c29ddffffa9cf6d816aa5e17383cb962ee1cc51dbab02ae5df948ce8fc
|
4
|
+
data.tar.gz: baa74553fa476a321ae3ec62ddc0b5eeab422d69964df7ffccc1a5a073e7a300
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 320834d6fca370309e497a28900e109cf8479b3db52787703c006ada5a6f7b3abad57cd7a447cebcd4ffa64123306f1939d6175446adaa4c8e56930337ef5df2
|
7
|
+
data.tar.gz: 474d25bd930004c43a1ecb3226beb1c26cce76977691d956fa182b7a8480b28b7231a74f4eac1adc0ff0d420d3383f414a94e464ad077cdccbd8725ff815b919
|
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
data/lib/porkbun.rb
CHANGED
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.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Bretoi
|
@@ -39,7 +39,6 @@ files:
|
|
39
39
|
- bin/porkbun
|
40
40
|
- lib/porkbun.rb
|
41
41
|
- lib/porkbun/version.rb
|
42
|
-
- sig/porkbun.rbs
|
43
42
|
homepage: https://github.com/danielb2/porkbun-ruby
|
44
43
|
licenses: []
|
45
44
|
metadata:
|
data/sig/porkbun.rbs
DELETED