Skip to content

Commit f7fb4ea

Browse files
committed
💙 Rascunho da estrutura do client <3
1 parent 2945fe7 commit f7fb4ea

20 files changed

+6531
-0
lines changed

.eslintrc.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"env": {
3+
"commonjs": true,
4+
"es6": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"standard"
9+
],
10+
"globals": {
11+
"Atomics": "readonly",
12+
"SharedArrayBuffer": "readonly"
13+
},
14+
"parserOptions": {
15+
"ecmaVersion": 2018
16+
},
17+
"rules": {
18+
}
19+
}

.github/static/cover.jpeg

1.57 MB
Loading

.github/static/logo.png

5.89 KB
Loading

.github/static/separator.png

25.1 KB
Loading

.github/workflows/ci.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Continuous Integration
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
node-version: [10.x]
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Set up node ${{ matrix.node-version }}
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: ${{ matrix.node-version }}
15+
- run: npm install
16+
- run: npm run lint
17+
- run: npm test

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
coverage/

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

README.md

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<div align="center">
2+
<a target="_blank" href="https://fieldcontrol.com.br/"><img src=".github/static/cover.jpeg" alt="FieldControl Cover" height="400px"></a>
3+
<div><code>npm install FieldControl --save</code></div>
4+
<br>
5+
<p>
6+
:cloud: Node.js bindings for the Field Control API - <a target="_blank" href="https://developers.fieldcontrol.com.br/">https://developers.fieldcontrol.com.br/</a>
7+
</p>
8+
<p>
9+
10+
11+
12+
</p>
13+
<small>
14+
Built with ❤ by
15+
<a href="https://github.com/FieldControl">FieldControl</a> and
16+
<a href="https://github.com/FieldControl/contaazul/graphs/contributors">contributors</a> - <a href="https://fieldcontrol.com.br/vaga-para-desenvolvedor.html?utm_source=github&utm_medium=opensource&utm_campaign=carchost-node">Estamos contratando!</a>
17+
</small>
18+
</div>
19+
20+
---
21+
22+
## Installation
23+
24+
This client is intended for server side use only.
25+
26+
```
27+
npm install FieldControl --save
28+
```
29+
30+
<div align="center">💙</div>
31+
32+
## Usage
33+
34+
```js
35+
const FieldControl = require('FieldControl')
36+
const client = new FieldControl({
37+
apiKey: 'ssssssssssshhhhhhhhhhhh:x~'
38+
})
39+
```
40+
41+
<div align="center">💙</div>
42+
43+
### Resources
44+
- [Employees](#employees)
45+
- [Services](#services)
46+
- [Tickets](#tickets)
47+
48+
### Employees
49+
50+
```js
51+
// Get an employee
52+
const response = await client.employees.get('MTY1NDk6MjI5MTU=')
53+
// {
54+
// "status": 200,
55+
// "data": {
56+
// "id": "MTY0MTU6MjI5MTU=",
57+
// "name": "Mauro Garcia",
58+
// "avatarUrl": null
59+
// }
60+
// }
61+
```
62+
63+
```js
64+
// List employees
65+
const response = await client.employees.list({
66+
pagination: {
67+
limit: 10,
68+
offset: 0
69+
}
70+
})
71+
// {
72+
// "status": 200,
73+
// "data": {
74+
// "items": [
75+
// {
76+
// "id": "MTY0MTU6MjI5MTU=",
77+
// "name": "Mauro Garcia",
78+
// "avatarUrl": null
79+
// },
80+
// {
81+
// "id": "MTY1NDk6MjI5MTU=",
82+
// "name": "Renan Valentin",
83+
// "avatarUrl": null
84+
// },
85+
// {
86+
// "id": "MTY1NTU6MjI5MTU=",
87+
// "name": "Felipe Zini",
88+
// "avatarUrl": null
89+
// }
90+
// ],
91+
// "totalCount": 3
92+
// }
93+
// }
94+
// }
95+
```
96+
<div align="right">
97+
<a href="https://github.com/FieldControl/carchost-node/blob/master/test/resources/employee.spec.js" target="_blank">see tests</a> - <a href="https://developers.fieldcontrol.com.br/#colaboradores" target="_blank">see docs</a>
98+
</div>
99+
100+
<div align="center">💙</div>
101+
102+
## Pull Requests
103+
104+
- **Add tests!** Your patch won't be accepted if it doesn't have tests.
105+
- **Document any change in behaviour**. Make sure the README and any other
106+
relevant documentation are kept up-to-date.
107+
- **Create topic branches**. Don't ask us to pull from your master branch.
108+
- **One pull request per feature**. If you want to do more than one thing, send
109+
multiple pull requests.
110+
111+
<div align="center">💙</div>
112+
113+
<div align="center">
114+
<br/>
115+
<br/>
116+
<br/>
117+
<br/>
118+
</div>
119+
120+
<div align="center">
121+
<p>
122+
<sub>
123+
Open source, from <a href="https://instagram.com/fieldcontrolapp" target="_blank">Field Control</a> with ❤ - <a href="https://fieldcontrol.com.br/vaga-para-desenvolvedor.html?utm_source=github&utm_medium=opensource&utm_campaign=carchost-node">Estamos contratando!</a>
124+
</sub>
125+
</p>
126+
</div>

0 commit comments

Comments
 (0)