Skip to content

Commit 79f7acf

Browse files
authored
Merge pull request #4 from infobip-community/add-sms
Add SMS channel and basic SDK structure and documentation.
2 parents 8a15d43 + e1b6eb3 commit 79f7acf

File tree

16 files changed

+3482
-316
lines changed

16 files changed

+3482
-316
lines changed

CODE_OF_CONDUCT.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
* Trolling, insulting or derogatory comments, and personal or political attacks
23+
* Public or private harassment
24+
* Publishing others' private information, such as a physical or email address, without their explicit permission
25+
* Contacting individual members, contributors, or leaders privately, outside designated community mechanisms, without their explicit permission
26+
* Other conduct which could reasonably be considered inappropriate in a professional setting
27+
28+
## Enforcement Responsibilities
29+
30+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
31+
32+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
33+
34+
## Scope
35+
36+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
37+
38+
## Enforcement
39+
40+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [[email protected]](mailto:[email protected]). All complaints will be reviewed and investigated promptly and fairly.
41+
42+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
43+
44+
## Enforcement Guidelines
45+
46+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
47+
48+
### 1. Correction
49+
50+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
51+
52+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
53+
54+
### 2. Warning
55+
56+
**Community Impact**: A violation through a single incident or series of actions.
57+
58+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
59+
60+
### 3. Temporary Ban
61+
62+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
63+
64+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
65+
66+
### 4. Permanent Ban
67+
68+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
69+
70+
**Consequence**: A permanent ban from any sort of public interaction within the community.
71+
72+
## Attribution
73+
74+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
75+
76+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
77+
78+
[homepage]: https://www.contributor-covenant.org
79+
80+
For answers to common questions about this code of conduct, see the FAQ at <https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.

CONTRIBUTING.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Contributing to Infobip Community
2+
3+
✨✨ First off, thanks for taking the time to contribute! ✨✨
4+
5+
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating,
6+
you are expected to uphold this code. Please report unacceptable behavior to [email protected].
7+
8+
The following is a set of guidelines for contributing to Infobip's SDKs or any other projects
9+
hosted in the [Infobip Organization](https://github.com/infobip-community) on GitHub.
10+
These are mostly guidelines, not rules. Use your best judgment,
11+
and feel free to propose changes to this document in a pull request.
12+
13+
## 🚩 Issues
14+
How to report a bug?
15+
16+
Bugs are tracked as [GitHub issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues). After you've determined which repository your bug is related to,
17+
create an issue on that repository and provide the following information by filling in comment section.
18+
19+
Explain the problem and include additional details to help maintainers reproduce the problem:
20+
* **Use a clear and descriptive title** for the issue to identify the problem.
21+
* **Describe the exact steps which reproduce the problem** in as many details as possible.
22+
* **Provide specific examples to demonstrate the steps**.
23+
* **Describe the behavior you observed after following the steps**
24+
* **Explain which behavior you expected to see instead and why.**
25+
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
26+
27+
## ℹ️ Asking for General Help
28+
29+
The [Infobip website](https://www.infobip.com/docs/api) has a list of resources for getting programming help and more.
30+
For any question contributors are available at [[email protected]](mailto:[email protected]).
31+
Please use the issue tracker for bugs only!
32+
33+
## ⬇️ Pull request
34+
35+
### 🍴 Step 1: Fork
36+
Fork the project on GitHub and clone your fork locally.
37+
Example for Python SDK repository:
38+
```bash
39+
git clone https://github.com/<your username>/infobip-api-go-sdk.git
40+
cd infobip-api-go-sdk
41+
git remote add upstream https://github.com/infobip-community/infobip-api-go-sdk.git
42+
git fetch upstream
43+
```
44+
### 🛠️ Step 2: Build
45+
Please run all the tests in the repository, all tests should pass.
46+
You can manually test by calling the included script from the root of the project:
47+
```bash
48+
bash scripts/run_tests.sh
49+
```
50+
51+
### 🌱 Step 3: Branch
52+
To keep your development environment organized, create local branches to hold your work.
53+
These should be branched directly off of the main branch.
54+
55+
```bash
56+
git checkout -b my-branch -t upstream/main
57+
```
58+
59+
### 💻 Step 4: Code
60+
Please follow code structure and naming structure that is already in the repository.
61+
Please make sure that all tests and linters pass for all changes. You can check for that in the [GitHub Actions.](https://github.com/infobip-community/infobip-api-rust-sdk/actions)
62+
We mostly adhere to the [Rust API Guidelines Checklist](https://rust-lang.github.io/api-guidelines/checklist.html) for style and best practices.
63+
We use `rustfmt` to keep the code well-formatted.
64+
65+
### ✅ Step 5: Commit
66+
It is recommended to keep your changes grouped logically within individual commits.
67+
Many contributors find it easier to review changes that are split across multiple commits.
68+
There is no limit to the number of commits in a pull request.
69+
70+
```bash
71+
git add my/changed/files
72+
git commit
73+
```
74+
75+
Note that multiple commits get squashed when they are landed.
76+
A good commit message should describe what changed and why.
77+
Commit message should:
78+
79+
* Contain a short description of the change (preferably 50 characters or less, and no more than 72 characters)
80+
* First letter should be capital and rest entirely in lowercase with the exception of proper nouns, acronyms,
81+
and the words that refer to code, like function/variable names
82+
83+
#### ⚠️ Breaking Changes
84+
85+
When a commit has a breaking change first line of commit text should be BREAKING CHANGE.
86+
Please take a look at [Cargo's guide on Semantic Versioning](https://doc.rust-lang.org/cargo/reference/semver.html) for more information.
87+
88+
### 📌 Step 6: Rebase
89+
Once you have committed your changes, it is a good idea to use git rebase (not git merge) to synchronize your work with the main repository.
90+
```bash
91+
git fetch upstream
92+
git rebase upstream/main
93+
```
94+
95+
### 🧪 Step 7: Tests
96+
Bug fixes and features should always come with tests. Look at other tests to see how they should be structured.
97+
Before submitting your changes in a pull request, always run the full test suite
98+
```bash
99+
cargo test
100+
cargo fmt --check
101+
cargo clippy
102+
```
103+
Make sure that no check reports issues and that all tests pass. Please do not submit patches that fail either check.
104+
105+
### 🚀 Step 8: Push
106+
Once your commits are ready to go -- with passing tests and linting -- begin the process of opening a pull request by pushing your working branch to your fork on GitHub.
107+
```bash
108+
git push origin my-branch
109+
```
110+
111+
### 📬 Step 9: Opening the Pull Request
112+
From within GitHub, open new pull request. Add repository admins as reviewers.
113+
Your PR may be delayed in being merged as maintainers seek more information or clarify ambiguities.
114+
115+
### 🤼 Step 10: Discuss and update
116+
You will probably get feedback or requests for changes to your pull request.
117+
This is a big part of the submission process so don't be discouraged!
118+
Some contributors may sign off on the pull request right away.
119+
Others may have detailed comments or feedback.
120+
This is a necessary part of the process in order to evaluate whether the changes are correct and necessary.
121+
122+
To make changes to an existing pull request, make the changes to your local branch,
123+
add a new commit with those changes, and push those to your fork. GitHub will automatically update the pull request.
124+
125+
```bash
126+
git add my/changed/files
127+
git commit
128+
git push origin my-branch
129+
```
130+
131+
Feel free to post a comment in the pull request to ping reviewers if you are awaiting an answer on something.
132+
133+
### 🌍 Step 11: Landing
134+
135+
In order to land, a pull request needs to be reviewed and approved by at least one repository Owner and pass CI.
136+
After that, if there are no objections from other contributors, the pull request can be merged.
137+
138+
🎉🎊 Congratulations and thanks for your contribution! 🎊🎉
139+
140+
Every pull request is tested on the Continuous Integration (CI) system to confirm that it works.
141+
Ideally, the pull request will pass ("be green") on all of CI's tests.
142+
This means that all tests pass and there are no linting errors.
143+
However, it is not uncommon for the CI infrastructure itself to fail on specific platforms or for so-called "flaky" tests to fail ("be red").
144+
Each CI failure must be manually inspected to determine the cause.
145+
146+
## 📜 Code of Conduct
147+
148+
This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md).
149+
By participating, you are expected to uphold this code.
150+
Please report unacceptable behavior to [[email protected]](mailto:[email protected]).
151+
152+
## 📚 Further Reading
153+
154+
For more in-depth guides on developing SDKs, see
155+
[Readme](README.md) and [Infobip's website](https://www.infobip.com/docs/api).

Cargo.toml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
[package]
2+
authors = ["Infobip DevRel [email protected]"]
3+
description = "Client SDK to use the Infobip API with pure Rust."
4+
documentation = "https://www.infobip.com/docs/api"
5+
edition = "2021"
6+
homepage = "https://www.infobip.com/"
7+
license = "MIT OR Apache-2.0"
28
name = "infobip_sdk"
9+
repository = "https://github.com/infobip-community/infobip-api-rust-sdk"
310
version = "0.1.0"
4-
edition = "2021"
5-
license = "MIT"
611

712
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
813

914
[dependencies]
10-
derive_builder = "*"
11-
lazy_static = "*"
12-
regex = "*"
13-
reqwest = { version = "*", features = ["blocking", "json", "multipart"] }
14-
serde = { version = "*", features = ["derive"] }
15-
serde_derive = "*"
16-
serde_json = "*"
17-
thiserror = "*"
18-
tokio = { version = "*", features = ["full"] }
19-
validator = { version = "*", features = ["derive"] }
15+
lazy_static = "1.4"
16+
regex = "1.6"
17+
reqwest = { version = "0.11", features = ["blocking", "json", "multipart"] }
18+
serde = { version = "1.0", features = ["derive"] }
19+
serde_derive = "1.0"
20+
serde_json = "1.0"
21+
thiserror = "1.0"
22+
tokio = { version = "1.20", features = ["full"] }
23+
validator = { version = "0.16", features = ["derive"] }
2024

2125
[dev-dependencies]
22-
httpmock = "*"
26+
httpmock = "0.6"
2327

2428
[features]
2529
default = ["sms"]

0 commit comments

Comments
 (0)