@@ -27,9 +27,9 @@ Author: Jonathan Hornung ([JohnnyTheTank](https://github.com/JohnnyTheTank))
27
27
youtubeFactory.getVideoById({
28
28
videoId: "<VIDEO _ID >",
29
29
key: "<YOUR _API_KEY >",
30
- }).success (function (_data) {
30
+ }).then (function (_data) {
31
31
//on success
32
- }).error (function (_data) {
32
+ }).catch (function (_data) {
33
33
//on error
34
34
});
35
35
```
@@ -44,9 +44,9 @@ youtubeFactory.getVideosFromChannelById({
44
44
maxResults: " <MAX_RESULTS>" , // (optional) valid values: 0-50 | default: 5
45
45
pageToken: " <PAGE_TOKEN>" , // (optional)
46
46
key: " <YOUR_API_KEY>" ,
47
- }).success (function (_data ) {
47
+ }).then (function (_data ) {
48
48
// on success
49
- }).error (function (_data ) {
49
+ }).catch (function (_data ) {
50
50
// on error
51
51
});
52
52
```
@@ -61,9 +61,9 @@ youtubeFactory.getVideosFromSearchByParams({
61
61
maxResults: " <MAX_RESULTS>" , // (optional) valid values: 0-50 | default: 5
62
62
pageToken: " <PAGE_TOKEN>" , // (optional)
63
63
key: " <YOUR_API_KEY>" ,
64
- }).success (function (_data ) {
64
+ }).then (function (_data ) {
65
65
// on success
66
- }).error (function (_data ) {
66
+ }).catch (function (_data ) {
67
67
// on error
68
68
});
69
69
```
@@ -75,9 +75,9 @@ youtubeFactory.getVideosFromPlaylistById({
75
75
maxResults: " <MAX_RESULTS>" , // (optional) valid values: 0-50 // default: 5
76
76
pageToken: " <PAGE_TOKEN>" , // (optional)
77
77
key: " <YOUR_API_KEY>" ,
78
- }).success (function (_data ) {
78
+ }).then (function (_data ) {
79
79
// on success
80
- }).error (function (_data ) {
80
+ }).catch (function (_data ) {
81
81
// on error
82
82
});
83
83
```
@@ -90,9 +90,9 @@ youtubeFactory.getChannelById({
90
90
channelId: " <CHANNEL_ID>" ,
91
91
pageToken: " <PAGE_TOKEN>" , // (optional)
92
92
key: " <YOUR_API_KEY>" ,
93
- }).success (function (_data ) {
93
+ }).then (function (_data ) {
94
94
// on success
95
- }).error (function (_data ) {
95
+ }).catch (function (_data ) {
96
96
// on error
97
97
});
98
98
```
0 commit comments