Giter VIP home page Giter VIP logo

api-examples's Introduction

Lens API

This repo has running code which you can execute to help you understand how to interact with the Lens API.

Lens API is beta at the moment and can change without warning!

Full documentation is available at https://docs.lens.dev/docs/introduction.

Setup

for the scripts to run you need to create a .env (or copy the template cp .env.template .env) file with these variables:

PK=YOUR_PK
MUMBAI_RPC_URL=https://rpc-mumbai.matic.today
PROFILE_ID=PROFILE_ID
LENS_API=https://api-mumbai.lens.dev/
LENS_HUB_CONTRACT=0x60Ae865ee4C725cd04353b5AAb364553f56ceF82
LENS_PERIPHERY_CONTRACT=0xD5037d72877808cdE7F669563e9389930AF404E8
INFURA_PROJECT_ID=YOUR_INFURA_PROJECT_ID
INFURA_SECRET=YOUR_INFURA_SECRET
  • Note 1:PROFILE_ID is optional but required on some endpoints! Also, make sure to insert the PROFILE_ID in hexadecimal format.
  • Note 2: Highly advised to create an API key and use the Alchemy RPC provider for Mumbai to avoid rate limiting.
  • Note 3: PK represents Private key here.
  • Note 4: This project uses infura ipfs to pin content which now is API keys only so you have to create an API key on their side. You can also use another storage provider or pinning service if you which, feel free to do a PR with that service and we can change the .env to include option to pick.

How to run

Always make sure you npm install beforehand.

look in the package.json file for the scripts section you see all the scripts you can run. This is prefixed with resolver:method.

example running:

$ npm run authentication:login

Issues

If you have any issues with the API or want a new endpoint please create an issue!

api-examples's People

Contributors

joshstevens19 avatar damarnez avatar zannis avatar pythonpete32 avatar atharvashukla avatar dependabot[bot] avatar satyajeetx avatar wd021 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.