{"size": 547, "ext": "js", "max_stars_repo_path": "src/utils/createSharingImage.js", "max_stars_repo_name": "jtomchak/gta-export-like", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/utils/createSharingImage.js", "max_issues_repo_name": "jtomchak/gta-export-like", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/utils/createSharingImage.js", "max_forks_repo_name": "jtomchak/gta-export-like", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.7826086957, "max_line_length": 91, "alphanum_fraction": 0.6435100548}
const createSharingImage = ({ cloudName, text }) => {
  const imageTransformations = [
    "w_1200",
    "h_627",
    "c_fill",
    "q_auto",
    "f_auto"
  ].join(",")

  const textTransformations = [
    "w_600",
    "x_480",
    "y_254",
    "g_south_west",
    "co_white",
    `l_text:roboto_64:${encodeURIComponent(text)}`
  ].join(",")
  const baseUrl = `https://res.cloudinary.com/${cloudName}/image/upload/`
  return `${baseUrl}${imageTransformations}/${textTransformations}/example_social_card.jpg`
}

module.exports = createSharingImage
