Hello, Javaniceday!

  • How to send a pushengage notification with node-fetch

    Context Sending push notifications from pushengage.com dashboard is pretty easy but what about f we want to automate some process in our web site? For instance, let say we want to send a push notification every time you create a blog post The code const baseUrl = ‘https://api.pushengage.com/apiv1/notifications’; const params = { title: ‘[notification title Read more

  • redis delete all keys

    Delete all the keys by a given prefix in a Redis cluster. Let’s ping our Redis instance redis-cli -h myhost.com -p 6379 ping Set some keys redis-cli -h myhost.com -p 6379 SET dev1 “val1” redis-cli -h myhost.com -p 6379 SET dev2 “val2” redis-cli -h myhost.com -p 6379 SET dev3 “val3” Get one key redis-cli -h Read more

  • Salesforce rest api download ContentVersion

    Salesforce rest api download ContentVersion

    The Salesforce REST API can be used to download a single file from the ContentVersion object. First, you will need to obtain a session id from the API. This will provide you with an auth token that you can use to make the request for the file. Fortunately the library jsforce will do all that… Read more

  • How to generate a random string in Apex

    How to generate a random string in Apex

    In Salesforce Apex, you can generate a random string using the following code: Read more

  • jsonplaceholder – free and unlimited json API placeholder

    What is a placeholder API Frandom is a JSON Placeholder fake REST API that is mainly used for prototyping and testing. The primary use of Frandom is to fake a server, sharing the code, and many such REST API uses are associated with it. You don’t need sign up so you can start using it Read more

  • Frandom API placeholder

    Frandom it’s an Rest API to return random data in JSON format. It’s 100% public at this moment and does not require API key to use it. Access to https://www.javaniceday.com/frandom List all available endpoints fetch(‘https://www.javaniceday.com/frandom/api/’) .then((response) => response.json()) .then((json) => console.log(json)); Output { companies: [ { endpoint: “/frandom/api/companies”, description: “Companies from US” }, { endpoint: Read more