altavares / gonimrod Goto Github PK
View Code? Open in Web Editor NEWCommand line app to send messages using the Nimrod API https://www.nimrod-messenger.io/
License: MIT License
Command line app to send messages using the Nimrod API https://www.nimrod-messenger.io/
License: MIT License
Awesome program, thank you xurei!
I just started testing it yesterday.
I notice on the nimrod-messenger.io website, the cURL code provided for sending an image is:
curl -X POST -H "Content-Type: application/json" -d '{
"api_key": "API_KEY",
"message":"My First Message"
}' "https://www.nimrod-messenger.io/api/v1/message"
As you can see, that's the same code that is used for sending a message. So, it doesn't send an image.
Please let me know when the website shows how to send an image via cURL, so I can try doing it.
Thanks.
Hi xurei,
I'm trying to write a bash script to send a message with nimrod via cURL. It works when I hard code the API key and message into the cURL command, but I can't get it to work when I try to use them in variables. I've tried changing the quotes (') to (") so the variable is not taken literally, but it still fails. For example, this code:
API_KEY=99x9999-x9x9-9x9x-9999999999 # Changed for privacy
MSG="This is a test"
curl -X POST -H "Content-Type: application/json" -d "{
'api_key': '$API_KEY',
'message': '$MSG'
}" "https://www.nimrod-messenger.io/api/v1/message"
Gives this error:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>SyntaxError: Unexpected token ' in JSON at position 3<br> at JSON.parse (<anonymous>)<br> at parse (/var/www/nimrod/node_modules/body-parser/lib/types/json.js:88:17)<br> at /var/www/nimrod/node_modules/body-parser/lib/read.js:116:18<br> at invokeCallback (/var/www/nimrod/node_modules/raw-body/index.js:262:16)<br> at done (/var/www/nimrod/node_modules/raw-body/index.js:251:7)<br> at IncomingMessage.onEnd (/var/www/nimrod/node_modules/raw-body/index.js:307:7)<br> at IncomingMessage.emit (node:events:406:35)<br> at IncomingMessage.emit (node:domain:475:12)<br> at endReadableNT (node:internal/streams/readable:1343:12)<br> at processTicksAndRejections (node:internal/process/task_queues:83:21)</pre>
</body>
</html>
Any ideas how to resolve this?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.