with Accredible and TinyPNG?
This source triggers when a new credential is issued to a recipient. See the documentation
Emit new event when an existing credential's details are updated or modified. See the documentation
Issue a new credential to a given recipient. See the documentation
Compress a WebP, JPEG, or PNG image using the TinyPNG API. See the documentation
Remove a specific credential from the system. See the documentation
Convert your images to your desired image type using TinyPNG. See the documentation
Create resized versions of your uploaded image. See the documentation
The Accredible API lets you automate the creation and management of digital certificates, badges, and blockchain credentials. Using Pipedream, you can connect the Accredible API to myriad services for streamlined workflow automation. Create digital certificates when a student completes a course, update credentials with new information, or share achievements across social platforms or via email. Pipedream's serverless platform enables you to integrate these actions with other apps, such as learning management systems, CRMs, and communication tools, without writing extensive code.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
accredible: {
type: "app",
app: "accredible",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.accredible.com/v1/issuer/details`,
headers: {
"Content-Type": `application/json`,
"Authorization": `Token token=${this.accredible.$auth.api_key}`,
},
})
},
})
The TinyPNG API lets you compress and optimize image files efficiently. With this API, you can shrink the size of PNG and JPEG files without a noticeable loss in quality, making it a crucial tool for improving website load times and saving bandwidth. On Pipedream, you can automate image optimization workflows, harnessing the power of TinyPNG to process batches of images, integrate with CMS platforms, trigger optimizations from various events, and more.
module.exports = defineComponent({
props: {
tinypng: {
type: "app",
app: "tinypng",
}
},
async run({steps, $}) {
const results = await require("@pipedream/platform").axios($, {
method: "post",
url: `https://api.tinify.com/shrink`,
auth: {
username: `api:${this.tinypng.$auth.api_key}`,
password: ``,
},
data: {
"source": {
"url": "https://tinypng.com/images/panda-happy.png"
}
},
})
const retVal = results.output
retVal.original_image_metadata = results.input
return retVal
},
})