Skip to content

Instantly share code, notes, and snippets.

@PxyUp
Last active October 22, 2024 00:27
Show Gist options
  • Save PxyUp/f92cc725bc7a8a1c122bc222f7d60785 to your computer and use it in GitHub Desktop.
Save PxyUp/f92cc725bc7a8a1c122bc222f7d60785 to your computer and use it in GitHub Desktop.
fitter_dev_to.json
{
"item": {
"connector_config": {
"response_type": "json",
"url": "https://dev.to/api/articles?top=1&per_page=10",
"server_config": {
"method": "GET"
}
},
"model": {
"base_field": {
"type": "array",
"generated": {
"model": {
"model": {
"base_field": {
"type": "boolean",
"generated": {
"static": {
"type": "boolean",
"value": "true"
}
}
}
},
"connector_config": {
"response_type": "json",
"url": "https://api.telegram.org/bot{{{FromEnv=BOT_TOKEN}}}/sendMessage",
"server_config": {
"headers": {
"Content-Type": "application/json"
},
"method": "POST",
"body": "{\"chat_id\":\"-1002266774017\", \"parse_mode\":\"MarkdownV2\", \"link_preview_options\":{\"is_disabled\":true}, \"text\":\"\\*Лучшие статьи за сегодня c Dev\\\\.to\\*\\n\\n{{{FromExp=join(map(fromJSON(fResJson), {let t=.title; string(#index + 1) + '\\\\. [' + reduce(['-', '\\'', '.'], replace(#acc, #, ''), t) + '](' + .url + ')'}), '\\n')}}}\\n\\n\\\\#it\\n\\nСделано с помощью [Fitter](https://github.com/PxyUp/fitter) и [конфига](https://gist.github.com/PxyUp/f92cc725bc7a8a1c122bc222f7d60785)\"}"
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment