@fwgapps/namecheap 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 (3) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +92 -0
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ ISC License
2
+
3
+ Copyright © 2025 by Fernandes Working Group
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # @fwgapps/namecheap
2
+
3
+ A simple and efficient TypeScript library for interacting with the Namecheap API, returning structured JSON responses.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Description](#description)
8
+ - [Features](#features)
9
+ - [Installation](#installation)
10
+ - [Usage](#usage)
11
+ - [Contributing](#contributing)
12
+ - [License](#license)
13
+
14
+ ## Description
15
+
16
+ This library provides a straightforward way to interact with the Namecheap API. It's designed to be easy to use both in **Node.js** and **browser** environments, with TypeScript definitions for type safety. The library helps developers automate domain management tasks via the Namecheap API.
17
+
18
+ ## Features
19
+
20
+ - Easy-to-use interface for interacting with the Namecheap API.
21
+ - Supports both **Node.js** and **browser** environments.
22
+ - Returns well-structured **JSON** responses for seamless integration.
23
+ - TypeScript definitions included for better developer experience.
24
+ - Minimal external dependencies for better performance.
25
+
26
+ ## Installation
27
+
28
+ You can install the library via npm or yarn:
29
+
30
+ ### Using npm
31
+
32
+ ```bash
33
+ npm install @fwgapps/namecheap
34
+ ```
35
+
36
+ ### Using yarn
37
+ ```bash
38
+ yarn add @fwgapps/namecheap
39
+ ```
40
+
41
+ ## Usage
42
+ ### Example in Node.js
43
+ ```ts
44
+ import Namecheap from '@fwgapps/namecheap';
45
+
46
+ const namecheap = new Namecheap('your-api-key', 'your-username');
47
+
48
+ async function getDomainInfo() {
49
+ try {
50
+ const response = await namecheap.domains.getInfo({ DomainName: 'example.com' });
51
+ console.log(response);
52
+ } catch (error) {
53
+ console.error('Error fetching domain info:', error);
54
+ }
55
+ }
56
+
57
+ getDomainInfo();
58
+ ```
59
+ ### Example in Browser
60
+ You can also use this library directly in the browser:
61
+ ```html
62
+ <script type="module">
63
+ import Namecheap from '@fwgapps/namecheap';
64
+
65
+ const namecheap = new Namecheap('your-api-key', 'your-username');
66
+
67
+ async function getDomainInfo() {
68
+ try {
69
+ const response = await namecheap.domains.getInfo({ DomainName: 'example.com' });
70
+ console.log(response);
71
+ } catch (error) {
72
+ console.error('Error fetching domain info:', error);
73
+ }
74
+ }
75
+
76
+ getDomainInfo();
77
+ </script>
78
+ ```
79
+
80
+ ## Contributing
81
+ We welcome contributions to this project! If you find a bug or want to suggest a feature, feel free to submit an issue or a pull request.
82
+
83
+ ### How to contribute
84
+ 1. Fork the repository.
85
+ 2. Create a new branch for your feature or bug fix.
86
+ 3. Make the necessary changes and commit them.
87
+ 4. Push your changes to your fork.
88
+ 5. Open a pull request with a description of your changes.
89
+ 6. Before submitting your pull request, ensure your code is linted and tested.
90
+
91
+ ## License
92
+ This project is licensed under the ISC License. See the [LICENSE](https://github.com/fwgapps/namecheap/LICENSE) file for more information.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fwgapps/namecheap",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",