How to use the-camp-lib - 4 common examples

To help you get started, we’ve selected a few the-camp-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ParkSB / the-camp-lib / examples / send-message / index.js View on Github external
const password = process.env.USER_PWD || '';

  const traineeName = process.env.TRAINEE_NAME || '';
  const unitName = process.env.UNIT_NAME || '';
  const enterDate = process.env.ENTER_DATE || '';
  const birth = Number(process.env.TRAINEE_BIRTH || '');

  const cookies = await thecamp.login(id, password);
  const [group] = await thecamp.fetchGroups(cookies, unitName, enterDate);

  const trainee = {
    birth,
    traineeName,
    unitCode: group.unitCode,
    groupId: group.groupId,
    relationship: thecamp.Relationship.FRIEND,
  };

  const message = {
    title: 'Test title',
    content: 'Test content',
  };

  await thecamp.sendMessage(cookies, trainee, message);
})();
github ParkSB / the-camp-lib / examples / send-message / index.js View on Github external
(async () => {
  dotenv.config();

  const id = process.env.USER_ID || '';
  const password = process.env.USER_PWD || '';

  const traineeName = process.env.TRAINEE_NAME || '';
  const unitName = process.env.UNIT_NAME || '';
  const enterDate = process.env.ENTER_DATE || '';
  const birth = Number(process.env.TRAINEE_BIRTH || '');

  const cookies = await thecamp.login(id, password);
  const [group] = await thecamp.fetchGroups(cookies, unitName, enterDate);

  const trainee = {
    birth,
    traineeName,
    unitCode: group.unitCode,
    groupId: group.groupId,
    relationship: thecamp.Relationship.FRIEND,
  };

  const message = {
    title: 'Test title',
    content: 'Test content',
  };

  await thecamp.sendMessage(cookies, trainee, message);
})();
github ParkSB / the-camp-lib / examples / send-message / index.js View on Github external
(async () => {
  dotenv.config();

  const id = process.env.USER_ID || '';
  const password = process.env.USER_PWD || '';

  const traineeName = process.env.TRAINEE_NAME || '';
  const unitName = process.env.UNIT_NAME || '';
  const enterDate = process.env.ENTER_DATE || '';
  const birth = Number(process.env.TRAINEE_BIRTH || '');

  const cookies = await thecamp.login(id, password);
  const [group] = await thecamp.fetchGroups(cookies, unitName, enterDate);

  const trainee = {
    birth,
    traineeName,
    unitCode: group.unitCode,
    groupId: group.groupId,
    relationship: thecamp.Relationship.FRIEND,
  };

  const message = {
    title: 'Test title',
    content: 'Test content',
  };

  await thecamp.sendMessage(cookies, trainee, message);
github ParkSB / the-camp-lib / examples / send-message / index.js View on Github external
const [group] = await thecamp.fetchGroups(cookies, unitName, enterDate);

  const trainee = {
    birth,
    traineeName,
    unitCode: group.unitCode,
    groupId: group.groupId,
    relationship: thecamp.Relationship.FRIEND,
  };

  const message = {
    title: 'Test title',
    content: 'Test content',
  };

  await thecamp.sendMessage(cookies, trainee, message);
})();

the-camp-lib

대국민 국군 소통 서비스 더 캠프 비공식 라이브러리

MIT
Latest version published 3 years ago

Package Health Score

39 / 100
Full package analysis

Similar packages