Get the profile of yourself.
Examples
getMe().then((res) => {
console.log(res);
});
Get the pending fields.
Examples
getPendingFields().then((res) => {
console.log(res);
});
Update your profile.
Parameters
data
{name: string, birthday: string, gender: string, school: string, department: string, talent: string, wantToTry: string, exchange: string, club: string, lecture: string, lovedCountry: string, trouble: string, affection: string, identityCardId: string}
Examples
const data = {...}; //key listed above could be used.
updateMe(data).then((res) => {
console.log(res);
});
Search posts by specified keyword.
Parameters
options
object - @param {Number} options.after provide a number to list comments after the provided number.- @param {Boolean} popular true | false
id
Number post id
Examples
const postId = 225688036;
const options = {};
listComments(postId, options).then((res) => {
console.log(res);
});
"You may also like these posts" based on a post id
Parameters
id
Number posd id
Examples
const id = 225688036;
listDarsysPosts(id).then((res) => {
console.log(res);
});
Get today's Dcard.
Examples
getDcard().then((res) => {
console.log(res);
});
Returns json
Send invitation to today's Dcard.
Parameters
Examples
const message = { firstMessage: 'Hello!' };
acceptDcard(message).then((res) => {
console.log(res);
});
Returns json
Reort Dcard.
Parameters
reportForm
ObjectreportForm.reason
String {reason: 'profileEmpty | profileSexual | photoNotReal | photoNotClear | photoNudity | photoOthers'}
Returns json
Get dcard's status
Returns json
List Posts of a forum
Parameters
options
object
Examples
const options = {
forum: 'vehicle',
popular: false,
before: 225687456,
};
listPost(options).then((res) => {
console.log(res);
});
List your posts. login required.
Parameters
Examples
const options = {
before: 225687456,
};
listMyPost(options).then((res) => {
console.log(res);
});
List your subscriptions. login required.
Parameters
Examples
const options = {
popular: true,
};
listMySubscription(options).then((res) => {
console.log(res);
});
Get content of a specified post id.
Parameters
Examples
const postId = 225688036;
const options = {};
getPost(postId, options).then((res) => {
console.log(res);
});
Search posts by specified keyword.
Parameters
Examples
const options = {
query: '愛情',
};
searchPost(options).then((res) => {
console.log(res);
});
Login to Dcard with email and password.
Parameters
email
String Your email for loginpassword
String Your password for logindata
{email: string, password: string}
Examples
createSession({ email: 'abc@example.com', password: 'Passw0rd' }).then((res) => {
console.log(res);
});