Introduction
⚡️ Superface will help you to quickly use and manage integrations, so you can focus on your application.
💸 Developing integrations over and over is expensive. Use integrations developed by others as you'd use npm packages or crates.
🔐 You data is safe, Superface isn't proxy.
🎓 This approach gives you a framework to decouple the lifecycle of your application and integrations it uses.
💥 Ready for more? Use advanced features like provider failover and monitoring.
🧐 Superface is a language and a protocol for abstracting integrations to application use-cases. It allows use-case discovery and distribution of integration code at runtime.
Fast track ⏱️
The easiest way to start is with OneSDK for Node.js and with an existing use-case. Let's say, you want to see what repositories Superface has on GitHub.
Install Node.js and create a new project with OneSDK:
mkdir my_project
cd my_project
npm init -y
npm install --save @superfaceai/one-sdk
Install vcs/user-repos
profile and configure GitHub
as a provider:
npx @superfaceai/cli install vcs/user-repos --providers github
Create index.js
file, and insert the following code:
const { SuperfaceClient } = require('@superfaceai/one-sdk');
const sdk = new SuperfaceClient();
async function run() {
// Load the installed profile
const profile = await sdk.getProfile('vcs/user-repos');
// Use the profile
const result = await profile.getUseCase('UserRepos').perform({
user: 'superfaceai',
});
return result.unwrap();
}
run();
Run it:
node index.js
tip
Check OneSDK repository to learn more about implementation.
Or read getting started for more detailed step by step guide.