Skip to content

Latest commit

 

History

History
155 lines (114 loc) · 5.67 KB

CONTRIBUTING.md

File metadata and controls

155 lines (114 loc) · 5.67 KB

Contributing to n8n-nodes-chatwork

Great that you are here and you want to contribute to n8n-nodes-chatwork

Contents

Directory Structure

The most important files

Development Setup

If you want to change or extend n8n-nodes-chatwork you have to make sure that all needed dependencies are installed and the packages get linked correctly. Here a short guide on how that can be done:

Requirements

  • node version >= 14.x
  • npm version >= 7.x

Actual n8n-nodes-chatwork setup

IMPORTANT: All the steps bellow have to get executed at least once to get the development setup up and running!

Now that everything the project requires to run is installed the project can be checked out and set up:

  1. Clone the repository

    git clone git@github.com:hoangsetup/n8n-nodes-chatwork.git
  2. Go into repository folder

    cd n8n-nodes-chatwork
  3. Install all dependencies

    npm install
  4. Build the code

    npm run build
  5. Symlink the package folder

    cp package.* ./dist
    cd dist
    npm link
  6. Create symbolic link

    cd ~./n8n/custom
    npm link n8n-nodes-chatwork

Start

npm run n8n

Development cycle

While iterating on n8n-nodes-chatwork modules code, you can run npm run dev. It will then automatically build your code, restart the backend on every change you make.

  1. Start n8n-nodes-chatwork in development mode

    npm run dev
  2. code, code, code

  3. Check if everything still runs in production mode

    npm run build
    npm run n8n
  4. Run all tests

    npm run test
  5. Commit code and create pull request

TODO list

The list of Chatwork apis need to complete:

  • /me - Used to access your account information
    • GET /me - Get your account information
  • /my - Used to access your data on the account.
    • GET /my/status - Get the number of: unread messages, unread To messages, and unfinished tasks.
    • GET /my/task - Get the list of all unfinished tasks.
  • /contacts - Used to access the list of your contacts
    • GET /contacts - Get the list of your contacts
  • /rooms - Used to access information such as messages, members, files, and tasks associated to a specific conversation.
    • GET /rooms - Get the list of all chats on your account
    • POST /rooms - Create a new group chat
    • GET /rooms/{room_id} - Get chat name, icon, and Type (my, direct, or group)
    • PUT /rooms/{room_id} - Change the title and icon type of the specified chat
    • DELETE /rooms/{room_id} - Leave/Delete a group chat
    • GET /rooms/{room_id}/members - Get the list of all chat members associated with the specified chat
    • PUT /rooms/{room_id}/members - Change associated members of group chat at once
    • GET /rooms/{room_id}/messages - Get all messages associated with the specified chat
    • POST /rooms/{room_id}/messages - Add new message to the chat
    • GET /rooms/{room_id}/messages/{message_id} - Get information about the specified message
    • PUT /rooms/{room_id}/messages/{message_id} - Update the specified message
    • DELETE /rooms/{room_id}/messages/{message_id} - Delete the specified message
    • GET /rooms/{room_id}/tasks - Get the list of tasks associated with the specified chat
    • POST /rooms/{room_id}/tasks - Add a new task to the chat
    • GET /rooms/{room_id}/tasks/{task_id} - Get information about the specified task
    • GET /rooms/{room_id}/files - Get the list of files associated with the specified chat
    • GET /rooms/{room_id}/files/{file_id} - Get information about the specified file
  • /incoming_requests - You can access contact approval requests you received
    • GET /incoming_requests - You can get the list of contact approval request you received
    • PUT /incoming_requests/{request_id} - You can approve a contact approval request you received
    • DELETE /incoming_requests/{request_id} - You can decline a contact approval request you received

Chatwork api documentation link