{"id":16485206,"url":"https://github.com/mrspartak/granny-js-client","last_synced_at":"2025-03-23T12:32:54.886Z","repository":{"id":42933667,"uuid":"237909046","full_name":"mrspartak/granny-js-client","owner":"mrspartak","description":"👵 Granny.js - JS API client","archived":false,"fork":false,"pushed_at":"2023-01-24T01:17:23.000Z","size":373,"stargazers_count":3,"open_issues_count":8,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-23T17:33:26.290Z","etag":null,"topics":["api","api-client","granny","granny-js-client","granny-server","image-processing","image-upload","js","nodejs","npm","npm-package"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrspartak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-03T07:31:50.000Z","updated_at":"2020-06-03T08:00:25.000Z","dependencies_parsed_at":"2023-02-13T08:15:56.428Z","dependency_job_id":null,"html_url":"https://github.com/mrspartak/granny-js-client","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fgranny-js-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fgranny-js-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fgranny-js-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fgranny-js-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrspartak","download_url":"https://codeload.github.com/mrspartak/granny-js-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221850629,"owners_count":16891659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","granny","granny-js-client","granny-server","image-processing","image-upload","js","nodejs","npm","npm-package"],"created_at":"2024-10-11T13:24:39.055Z","updated_at":"2024-10-28T15:48:02.292Z","avatar_url":"https://github.com/mrspartak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A client library from Granny server\nA library for Granny image delivery server\n\n[![npm](https://img.shields.io/npm/v/granny?style=for-the-badge)](https://www.npmjs.com/package/granny) \n[![Join the chat at https://gitter.im/granny-js/community](https://img.shields.io/gitter/room/granny-js/community?style=for-the-badge)](https://gitter.im/granny-js/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n## Ecosystem\n![image](https://user-images.githubusercontent.com/993910/74678258-8f250380-51cb-11ea-9b5e-1640e713380e.PNG)\n\n[granny-server-backend](https://github.com/mrspartak/granny-server-backend \"granny-server-backend\") - Backend service with API exposed to upload and serve/manipulate images  \n[granny-js-client](https://github.com/mrspartak/granny-js-client \"granny-js-client\") - Client library that works both in nodejs and browser. Makes API calls easier  \n[granny-server-frontend](https://github.com/mrspartak/granny-server-frontend \"granny-server-frontend\") - Frontend APP that uses client to manage your CDN domains and settings  \n[granny-server-cron](https://github.com/mrspartak/granny-server-cron \"granny-server-cron\") - Utility app  \n\n## Setup\nThis library can be used in both nodejs and browser environment. Browser clint made only for staging or admin panel development, because you can expose your credentials in browser.\n\n**NPM**\n```\nnpm i granny\n```\n\n**Building from source**\n```\ngit clone git@github.com:mrspartak/granny-js-client.git\ncd granny-js-client\n\n//if you need browser version\nnpm run build\n//request to your browser build/index.js\n\n//if you need nodejs version it is stored in src/index.js\n```\n\n**Or download latest release**  \n[![npm](https://img.shields.io/npm/v/granny?style=for-the-badge)](https://github.com/mrspartak/granny-js-client/releases)\n\n## Basic usage\nNodejs\n```js\nconst Granny = require('granny')\n\nconst grannyApi = new Granny({\n\tdomain: 'https://cdn.example.com', //url to Granny server backend\n\taccessKey: 'key',\n\taccessSecret: 'secret'\n})\n\nvar [err, result] = await grannyApi.uploadImage({path: '/users/sergio.jpeg', image: './tmp/DSCF6278.jpg'})\nconsole.log(result.imageUrl)\n/*\n\tresult.imageUrl = https://cdn.example.com/i/users/sergio.jpeg\n\n\tNow you can use direct link or modify image on fly\n\thttps://cdn.example.com/i/r=100/_/users/sergio.jpeg - will resize image to 100x100\n\thttps://cdn.example.com/i/width=500,format=webp/_/users/sergio.jpeg - will resize to width=500 saving aspect ratio and format to webp\n*/\n```\n\n## API\nCurrently here: https://github.com/mrspartak/granny-js-client/blob/master/API.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrspartak%2Fgranny-js-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrspartak%2Fgranny-js-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrspartak%2Fgranny-js-client/lists"}