|
12 | 12 |
|
13 | 13 | A node wrapper for the [Netcup CCP API](https://www.netcup-wiki.de/wiki/CCP_API). |
14 | 14 |
|
| 15 | +Docs: [https://proohit.github.io/netcup-node/](https://proohit.github.io/netcup-node/) |
| 16 | + |
15 | 17 | ## Current support |
16 | 18 |
|
17 | 19 | - only [JSON Rest API](https://www.netcup-wiki.de/wiki/CCP_API#Anmerkungen_zu_JSON-Requests), no SOAP yet |
@@ -100,81 +102,3 @@ const api = await new NetcupApi().init({ |
100 | 102 | }); |
101 | 103 | const dnsInfo = await api.infoDnsZone({ domainname: 'YOUR.DOMAIN' }); |
102 | 104 | ``` |
103 | | - |
104 | | -### Reference |
105 | | - |
106 | | -```javascript |
107 | | -/** |
108 | | - * Initializes authentication parameters |
109 | | - */ |
110 | | -NetcupApi.init({ |
111 | | - apikey: 'YOUR_API_KEY', |
112 | | - apipassword: 'YOUR_API_PASSWORD', |
113 | | - customernumber: 'YOUR_CUSTOMER_NUMBER', |
114 | | -}); |
115 | | - |
116 | | -/** |
117 | | - * Retrieves information about a DNS zone |
118 | | - * */ |
119 | | -NetcupApi.infoDnsZone({ |
120 | | - domainname: 'YOUR.DOMAIN', |
121 | | -}); |
122 | | - |
123 | | -/** |
124 | | - * Retrieves information about DNS records of a domain |
125 | | - * */ |
126 | | -NetcupApi.infoDnsRecords({ |
127 | | - domainname: 'YOUR.DOMAIN', |
128 | | -}); |
129 | | - |
130 | | -/** |
131 | | - * Updates DNS records of a domain and only those that are specified. |
132 | | - */ |
133 | | -NetcupApi.updateDnsRecords({ |
134 | | - domainname: 'example.com', |
135 | | - dnsrecordset: { |
136 | | - dnsrecords: [{ name: 'www', type: 'A', destination: 'some-ip' }], |
137 | | - }, |
138 | | -}); |
139 | | -// can also be used for deletion |
140 | | -NetcupApi.updateDnsRecords({ |
141 | | - domainname: 'example.com', |
142 | | - dnsrecordset: { |
143 | | - dnsrecords: [ |
144 | | - { name: 'www', type: 'A', destination: 'some-ip', deleterecord: true }, |
145 | | - ], |
146 | | - }, |
147 | | -}); |
148 | | - |
149 | | -/** |
150 | | - * Updates DNS records of a domain with the current public ip. |
151 | | - * @example |
152 | | - * // update ipv4 only |
153 | | - * await api.updateDnsRecordsWithCurrentIp({ domainname: 'example.com', dnsrecords: [{ hostname: 'www' }] }) |
154 | | - * @example |
155 | | - * // update ipv4 and ipv6 |
156 | | - * await api.updateDnsRecordsWithCurrentIp({ domainname: 'example.com', dnsrecords: [{ hostname: 'www' }], useIpv4AndIpv6: true }) |
157 | | - * @example |
158 | | - * // update ipv6 only |
159 | | - * await api.updateDnsRecordsWithCurrentIp({ domainname: 'example.com', dnsrecords: [{ hostname: 'www' }], useIpv6Only: true }) |
160 | | - */ |
161 | | -// update ipv4 only |
162 | | -NetcupApi.updateDnsRecordWithCurrentIp({ |
163 | | - domainname: 'example.com', |
164 | | - dnsrecordset: { dnsrecords: [{ hostname: 'www' }] }, |
165 | | -}); |
166 | | - |
167 | | -// update ipv4 and ipv6 |
168 | | -NetcupApi.updateDnsRecordWithCurrentIp({ |
169 | | - domainname: 'example.com', |
170 | | - dnsrecordset: { dnsrecords: [{ hostname: 'www' }] }, |
171 | | - useIpv4AndIpv6: true, |
172 | | -}); |
173 | | - |
174 | | -// update ipv6 only |
175 | | -NetcupApi.updateDnsRecordWithCurrentIp({ |
176 | | - domainname: 'example.com', |
177 | | - dnsrecordset: { dnsrecords: [{ hostname: 'www' }] }, |
178 | | - useIpv6Only: true, |
179 | | -}); |
180 | | -``` |
0 commit comments