Skip to content

Commit f4d1a8d

Browse files
authored
Merge pull request #348 from superfaceai/docs/ghd
docs: Replace Discord w/ GH Discussions, update copyright year
2 parents 210a706 + d8c11ea commit f4d1a8d

File tree

2 files changed

+45
-41
lines changed

2 files changed

+45
-41
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ We are glad that you are interested in Superface in the way of contributing. We
1616

1717
## Need help?
1818

19-
If you have any question about this project (for example, how to use it) or if you just need some clarification about anything, please [open an issue](https://github.com/superfaceai/one-sdk-js/issues/new/choose) or ask on the [Discord server](https://sfc.is/discord). Alternatively check the [Support page](https://superface.ai/support) for other ways how to reach us.
19+
If you have any question about this project (for example, how to use it) or if you just need some clarification about anything, please [open an issue](https://github.com/superfaceai/one-sdk-js/issues/new/choose) or check the [Support page](https://superface.ai/support) for other ways how to reach us.
2020

2121
## Contributing
2222

README.md

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[Website](https://superface.ai) | [Get Started](https://superface.ai/docs/getting-started) | [Documentation](https://superface.ai/docs) | [Discord](https://sfc.is/discord) | [Twitter](https://twitter.com/superfaceai) | [Support](https://superface.ai/support)
1+
[Website](https://superface.ai) | [Get Started](https://superface.ai/docs/getting-started) | [Documentation](https://superface.ai/docs) | [GitHub Discussions](https://sfc.is/discussions) | [Twitter](https://twitter.com/superfaceai) | [Support](https://superface.ai/support)
22

33
<img src="https://github.com/superfaceai/one-sdk-js/raw/main/docs/LogoGreen.png" alt="Superface" width="100" height="100">
44

@@ -10,7 +10,7 @@
1010
[![npm](https://img.shields.io/npm/v/@superfaceai/one-sdk)](https://www.npmjs.com/package/@superfaceai/one-sdk)
1111
[![license](https://img.shields.io/npm/l/@superfaceai/one-sdk)](LICENSE)
1212
![TypeScript](https://img.shields.io/static/v1?message=TypeScript&&logoColor=ffffff&color=007acc&labelColor=5c5c5c&label=built%20with)
13-
[![Discord](https://img.shields.io/discord/819563244418105354?logo=discord&logoColor=fff)](https://sfc.is/discord)
13+
[![GitHub Discussions](https://img.shields.io/github/discussions/superfaceai/.github?logo=github&logoColor=fff)](https://github.com/orgs/superfaceai/discussions)
1414

1515
OneSDK is a universal API client which provides an unparalleled developer experience for every HTTP API. It enhances resiliency to API changes, and comes with built-in integration monitoring and provider failover.
1616

@@ -21,7 +21,7 @@ For more details about Superface, visit [How it Works](https://superface.ai/how-
2121
- [Superface website](https://superface.ai)
2222
- [Get Started](https://superface.ai/docs/getting-started)
2323
- [Documentation](https://superface.ai/docs)
24-
- [Discord](https://sfc.is/discord)
24+
- [Support](https://superface.ai/support)
2525

2626
## Install
2727

@@ -46,12 +46,13 @@ yarn add @superfaceai/one-sdk
4646
Superface is all about use cases. You can start with one of the publically available use cases from the [Superface Catalog](https://superface.ai/catalog).
4747

4848
Once you've got your use case, you need to provide OneSDK with:
49-
* profile name and version
50-
* use case name
51-
* provider name
52-
* input parameters
53-
* (if necessary) provider-specific integration parameters
54-
* (if necessary) provider-specific security values
49+
50+
- profile name and version
51+
- use case name
52+
- provider name
53+
- input parameters
54+
- (if necessary) provider-specific integration parameters
55+
- (if necessary) provider-specific security values
5556

5657
These can be found on the profile page (e.g. [vcs/user-repos](https://superface.ai/vcs/user-repos)). Security values need to be obtained through the relevant provider (e.g. on their website, in your account settings, by contacting them, etc.).
5758

@@ -61,25 +62,30 @@ const { SuperfaceClient } = require('@superfaceai/one-sdk');
6162
const sdk = new SuperfaceClient();
6263

6364
async function run() {
64-
const profile = await sdk.getProfile({ id: '<profileName>', version: '<profileVersion>'});
65-
66-
const result = await profile.getUseCase('<usecaseName>').perform({
67-
// Input parameters in format:
68-
'<key>': '<value>'
69-
},
70-
{
71-
provider: '<providerName>',
72-
parameters: {
73-
// Provider specific integration parameters in format:
74-
'<integrationParameterName>': '<integrationParameterValue>'
65+
const profile = await sdk.getProfile({
66+
id: '<profileName>',
67+
version: '<profileVersion>',
68+
});
69+
70+
const result = await profile.getUseCase('<usecaseName>').perform(
71+
{
72+
// Input parameters in format:
73+
'<key>': '<value>',
7574
},
76-
security: {
77-
// Provider specific security values in format:
78-
'<securityValueId>': {
79-
// Security values as described on profile page
80-
}
75+
{
76+
provider: '<providerName>',
77+
parameters: {
78+
// Provider specific integration parameters in format:
79+
'<integrationParameterName>': '<integrationParameterValue>',
80+
},
81+
security: {
82+
// Provider specific security values in format:
83+
'<securityValueId>': {
84+
// Security values as described on profile page
85+
},
86+
},
8187
}
82-
});
88+
);
8389

8490
console.log(result.unwrap());
8591
}
@@ -90,11 +96,13 @@ run();
9096
If you are missing a use case, [let us know](#support)! You can also always [add your own use-case or API provider](https://superface.ai/docs/guides/how-to-create).
9197

9298
### Advanced usage
99+
93100
As your project grows in size and complexity, you may find it useful to have a central location for configuring details concerning your API integrations. There are also some features that cannot be used with the simple approach described above, namely:
94-
- Using [locally stored profiles, maps and providers](https://superface.ai/docs/advanced-usage#local); e.g. (yet) unpublished integrations, or integrations with APIs internal to your organization.
95-
- Configuring [provider failover](https://superface.ai/docs/guides/using-multiple-providers#failover).
96101

97-
For these cases, there's Superface configuration.
102+
- Using [locally stored profiles, maps and providers](https://superface.ai/docs/advanced-usage#local); e.g. (yet) unpublished integrations, or integrations with APIs internal to your organization.
103+
- Configuring [provider failover](https://superface.ai/docs/guides/using-multiple-providers#failover).
104+
105+
For these cases, there's Superface configuration.
98106
To find out more, visit [Advanced Usage](https://superface.ai/docs/advanced-usage).
99107

100108
## Security
@@ -127,21 +135,19 @@ For metrics to be successfuly sent, the application needs to exit properly, i.e.
127135

128136
## Support
129137

130-
If you have any questions, want to report a bug, request a feature or you just want to talk, feel free to [open an issue](https://github.com/superfaceai/one-sdk-js/issues/new/choose) or hop on our [Discord server](https://sfc.is/discord).
131-
132-
You can find more options for reaching us on the [Support page](https://superface.ai/support).
138+
If you have any questions, want to report a bug, request a feature or you just want to talk, feel free to [open an issue](https://github.com/superfaceai/one-sdk-js/issues/new/choose) or reach us in other ways through the [Support page](https://superface.ai/support).
133139

134140
## Public API
135141

136142
Only functions and APIs of entities below are a part of the public API, and can be safely relied upon not to break between semver-compatible releases.
137143

138144
Using other parts of this package is at your own risk.
139145

140-
* SuperfaceClient API
141-
* Profile API
142-
* UseCase API
143-
* SuperJsonDocument Object
144-
* Result API
146+
- SuperfaceClient API
147+
- Profile API
148+
- UseCase API
149+
- SuperJsonDocument Object
150+
- Result API
145151

146152
Use of public APIs is described in the [reference](https://superface.ai/docs/reference/one-sdk).
147153

@@ -153,6 +159,4 @@ We welcome all kinds of contributions! Please see the [Contribution Guide](CONTR
153159

154160
OneSDK is licensed under the [MIT License](LICENSE).
155161

156-
© 2022 Superface s.r.o.
157-
158-
<!-- TODO: allcontributors -->
162+
© 2023 Superface s.r.o.

0 commit comments

Comments
 (0)