You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.ts 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /**
  2. * Google API URL to retrieve streams for a live broadcast of a user.
  3. *
  4. * NOTE: The URL must be appended by a broadcast ID returned by a call towards
  5. * {@code API_URL_LIVE_BROADCASTS}.
  6. *
  7. * @type {string}
  8. */
  9. // eslint-disable-next-line max-len
  10. export const API_URL_BROADCAST_STREAMS = 'https://content.googleapis.com/youtube/v3/liveStreams?part=id%2Csnippet%2Ccdn%2Cstatus&id=';
  11. /**
  12. * Google API URL to retrieve live broadcasts of a user.
  13. *
  14. * @type {string}
  15. */
  16. // eslint-disable-next-line max-len
  17. export const API_URL_LIVE_BROADCASTS = 'https://content.googleapis.com/youtube/v3/liveBroadcasts?broadcastType=all&mine=true&part=id%2Csnippet%2CcontentDetails%2Cstatus';
  18. /**
  19. * Array of API discovery doc URLs for APIs used by the googleApi.
  20. *
  21. * @type {string}
  22. */
  23. export const DISCOVERY_DOCS = 'https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest';
  24. /**
  25. * An enumeration of the different states the Google API can be in.
  26. *
  27. * @private
  28. * @type {Object}
  29. */
  30. export const GOOGLE_API_STATES = {
  31. /**
  32. * The state in which the Google API still needs to be loaded.
  33. */
  34. NEEDS_LOADING: 0,
  35. /**
  36. * The state in which the Google API is loaded and ready for use.
  37. */
  38. LOADED: 1,
  39. /**
  40. * The state in which a user has been logged in through the Google API.
  41. */
  42. SIGNED_IN: 2,
  43. /**
  44. * The state in which the Google authentication is not available (e.g. Play
  45. * services are not installed on Android).
  46. */
  47. NOT_AVAILABLE: 3
  48. };
  49. /**
  50. * Google API auth scope to access Google calendar.
  51. *
  52. * @type {string}
  53. */
  54. export const GOOGLE_SCOPE_CALENDAR = 'https://www.googleapis.com/auth/calendar';
  55. /**
  56. * Google API auth scope to access user email.
  57. *
  58. * @type {string}
  59. */
  60. export const GOOGLE_SCOPE_USERINFO = 'https://www.googleapis.com/auth/userinfo.email';
  61. /**
  62. * Google API auth scope to access YouTube streams.
  63. *
  64. * @type {string}
  65. */
  66. export const GOOGLE_SCOPE_YOUTUBE
  67. = 'https://www.googleapis.com/auth/youtube.readonly';