Ping
📘
Full Code Repo - https://github.com/aave/lens-api-examples
🌿
Lens API - https://docs.lens.xyz/docs/ping
Ping API ping()
returns if the API is online.
API operation
Lens.ping()
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
API response
{
"ping": "pong"
}
Full Code Example
import { Lens } from 'lens-protocol';
import { useEffect } from 'react';
export default function Example() {
useEffect(() => {
Lens.ping()
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
}, []);
}
Last updated on July 28, 2022