Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

constants.ts 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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
  24. = [ 'https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest' ];
  25. /**
  26. * An enumeration of the different states the Google API can be in.
  27. *
  28. * @private
  29. * @type {Object}
  30. */
  31. export const GOOGLE_API_STATES = {
  32. /**
  33. * The state in which the Google API still needs to be loaded.
  34. */
  35. NEEDS_LOADING: 0,
  36. /**
  37. * The state in which the Google API is loaded and ready for use.
  38. */
  39. LOADED: 1,
  40. /**
  41. * The state in which a user has been logged in through the Google API.
  42. */
  43. SIGNED_IN: 2,
  44. /**
  45. * The state in which the Google authentication is not available (e.g. Play
  46. * services are not installed on Android).
  47. */
  48. NOT_AVAILABLE: 3
  49. };
  50. /**
  51. * Google API auth scope to access Google calendar.
  52. *
  53. * @type {string}
  54. */
  55. export const GOOGLE_SCOPE_CALENDAR = 'https://www.googleapis.com/auth/calendar';
  56. /**
  57. * Google API auth scope to access YouTube streams.
  58. *
  59. * @type {string}
  60. */
  61. export const GOOGLE_SCOPE_YOUTUBE
  62. = 'https://www.googleapis.com/auth/youtube.readonly';