shortenURL#

hvpy.shortenURL(queryString, callback=None)[source]#

Shorten a Helioviewer.org URL with the bit.ly URL shortening web service.

Parameters:
  • queryString (str) – The URL-encoded query string.

  • callback (Optional[str]) – Wrap the response object in a function call of your choosing. Default is None (no wrapping), optional.

Return type:

Union[bytes, str, Dict[str, Any]]

References

Examples

>>> from hvpy import shortenURL
>>> shortenURL(queryString="https://api.helioviewer.org/v2/queueMovie/?startTime=2010-03-01T12:12:12Z&endTime=2010-03-04T12:12:12Z")
{'status_code': ..., 'status_txt': 'OK', 'data': {'long_url': ..., 'url': ...}}