Crossbell Link
TIP
You can use Crossbell API for free (no rate limit disclosed).
API
Get
const links: Links = await unidata.links.get(options: {
source: 'Crossbell Link';
identity: string;
platform?: string;
type?: string;
reversed?: boolean;
cursor?: number;
limit?: number;
filter?: {
to?: string;
}
});
- Use Ethereum address as the
identity
and'Ethereum'
as theplatform
to get links from all links belonging to this address. - Use Crossbell handle as the
identity
and'Crossbell'
as theplatform
to get links from a specific profile. - Use
filter.to
to get links to a certain Crossbell identity, useful when checking if a link exists with a certain Crossbell identity.
Set
const result: {
code: number;
message: string;
} = await unidata.links.set(
options: {
source: 'Crossbell Link';
identity: string;
platform?: 'Ethereum' | 'Crossbell';
action?: 'add' | 'remove';
},
input: {
to: string;
type: string;
}
);
- Use Ethereum address as the
identity
and'Ethereum'
as theplatform
to set link from primary profile of this address. - Use Crossbell handle as the
identity
and'Crossbell'
as theplatform
to set link from a specific profile. action
: can beadd
orremove
, default toadd
.to
: the profile handle you want to link to.
Live Demo
42 / 42
Code
const links: Links = await unidata.links.get({
source: 'Crossbell Link',
identity: '0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944',
platform: 'Ethereum',
});
View
Following
Followers
Data
{}
Reversed Links Data
{}
Set
Open the browser console and execute the following code
add action:
await unidata.links.set(
{
source: 'Crossbell Link',
identity: '<your_ethereum_address>',
platform: 'Ethereum',
action: 'add',
},
{
to: 'diygod',
type: 'follow',
},
);
remove action:
await unidata.links.set(
{
source: 'Crossbell Link',
identity: '<your_ethereum_address>',
platform: 'Ethereum',
action: 'remove',
},
{
to: 'diygod',
type: 'follow',
},
);