Skip to content

Commit 3512fa3

Browse files
authored
Merge pull request #52 from fa0311/dev
Dev
2 parents f6efb72 + 9928592 commit 3512fa3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+3122
-238
lines changed

LICENSE

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
twitter-openapi License
2+
3+
Copyright (c) 2023 yuki
4+
5+
<https://yuki0311.com/>
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
The Software shall not be used for any activity that involves the following types
18+
of behavior, commonly known as spam:
19+
20+
1. Sending unsolicited or excessive messages or posts.
21+
2. Aggressively following, unfollowing, or liking tweets to artificially boost engagement.
22+
3. Engaging in aggressive automated actions that disrupt or annoy other users.
23+
4. Distributing false or misleading information.
24+
25+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31+
SOFTWARE.

twitter-openapi-typescript-generated/LICENSE.txt renamed to LICENSE.AGPL

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GNU AFFERO GENERAL PUBLIC LICENSE
22
Version 3, 19 November 2007
33

4-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
55
Everyone is permitted to copy and distribute verbatim copies
66
of this license document, but changing it is not allowed.
77

@@ -643,7 +643,7 @@ the "copyright" line and a pointer to where the full notice is found.
643643
GNU Affero General Public License for more details.
644644

645645
You should have received a copy of the GNU Affero General Public License
646-
along with this program. If not, see <http://www.gnu.org/licenses/>.
646+
along with this program. If not, see <https://www.gnu.org/licenses/>.
647647

648648
Also add information on how to contact you by electronic and paper mail.
649649

@@ -658,4 +658,4 @@ specific requirements.
658658
You should also get your employer (if you work as a programmer) or school,
659659
if any, to sign a "copyright disclaimer" for the program, if necessary.
660660
For more information on this, and how to apply and follow the GNU AGPL, see
661-
<http://www.gnu.org/licenses/>.
661+
<https://www.gnu.org/licenses/>.

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,17 @@ npm run build
4343

4444
Setup
4545

46-
It cannot be installed from npm.
47-
Plan to release it in v1.0.0 with npm.
48-
4946
```shell
50-
git clone https://github.com/fa0311/twitter-openapi-typescript
51-
npm install ./twitter-openapi-typescript/twitter-openapi-typescript
47+
npm twitter-openapi-typescript-generated
5248
```
5349

50+
License
51+
52+
This project is dual licensed. You can choose one of the following licenses:
53+
54+
- [Custom License](./LICENSE)
55+
- [GNU Affero General Public License v3.0](./LICENSE.AGPL)
56+
5457
Usage
5558

5659
[twitter-openapi-typescript-generated/README.md](./twitter-openapi-typescript-generated/README.md)

twitter-openapi-typescript-generated/.openapi-generator/FILES

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ src/apis/V11PostApi.ts
1313
src/apis/V20GetApi.ts
1414
src/apis/index.ts
1515
src/index.ts
16+
src/models/AdditionalMediaInfo.ts
1617
src/models/BookmarksResponse.ts
1718
src/models/BookmarksResponseData.ts
1819
src/models/BookmarksTimeline.ts
20+
src/models/Callback.ts
21+
src/models/ClientEventInfo.ts
1922
src/models/CommunitiesActions.ts
2023
src/models/ContentEntryType.ts
2124
src/models/ContentItemType.ts
2225
src/models/ContentUnion.ts
26+
src/models/CoverCta.ts
2327
src/models/CreateRetweet.ts
2428
src/models/CreateRetweetResponse.ts
2529
src/models/CreateRetweetResponseData.ts
@@ -28,6 +32,7 @@ src/models/CreateTweet.ts
2832
src/models/CreateTweetResponse.ts
2933
src/models/CreateTweetResponseData.ts
3034
src/models/CreateTweetResponseResult.ts
35+
src/models/CtaClientEventInfo.ts
3136
src/models/CursorType.ts
3237
src/models/DeleteRetweetResponse.ts
3338
src/models/DeleteRetweetResponseData.ts
@@ -37,6 +42,7 @@ src/models/DeleteTweetResponseResult.ts
3742
src/models/Entities.ts
3843
src/models/ErrorExtensions.ts
3944
src/models/Errors.ts
45+
src/models/ExtMediaAvailability.ts
4046
src/models/ExtendedEntities.ts
4147
src/models/FavoriteTweet.ts
4248
src/models/FavoriteTweetResponseData.ts
@@ -71,7 +77,14 @@ src/models/ListTweetsTimelineData.ts
7177
src/models/ListTweetsTimelineList.ts
7278
src/models/Location.ts
7379
src/models/Media.ts
80+
src/models/MediaExtended.ts
7481
src/models/MediaOriginalInfo.ts
82+
src/models/MediaOriginalInfoFocusRect.ts
83+
src/models/MediaSize.ts
84+
src/models/MediaSizes.ts
85+
src/models/MediaStats.ts
86+
src/models/MediaVideoInfo.ts
87+
src/models/MediaVideoInfoVariant.ts
7588
src/models/ModelError.ts
7689
src/models/ModuleEntry.ts
7790
src/models/ModuleItem.ts
@@ -103,20 +116,27 @@ src/models/SearchByRawQuery.ts
103116
src/models/SearchTimeline.ts
104117
src/models/SearchTimelineData.ts
105118
src/models/SearchTimelineResponse.ts
119+
src/models/SelfThread.ts
106120
src/models/Session.ts
107121
src/models/SocialContext.ts
122+
src/models/Text.ts
123+
src/models/TextEntity.ts
124+
src/models/TextEntityRef.ts
108125
src/models/Timeline.ts
109126
src/models/TimelineAddEntries.ts
110127
src/models/TimelineAddEntry.ts
111128
src/models/TimelineAddToModule.ts
112129
src/models/TimelineClearCache.ts
130+
src/models/TimelineCoverBehavior.ts
131+
src/models/TimelineHalfCover.ts
113132
src/models/TimelineMessagePrompt.ts
114133
src/models/TimelinePinEntry.ts
115134
src/models/TimelinePrompt.ts
116135
src/models/TimelineReplaceEntry.ts
117136
src/models/TimelineResponse.ts
118137
src/models/TimelineShowAlert.ts
119138
src/models/TimelineShowAlertRichText.ts
139+
src/models/TimelineShowCover.ts
120140
src/models/TimelineTerminateTimeline.ts
121141
src/models/TimelineTimelineCursor.ts
122142
src/models/TimelineTimelineItem.ts
@@ -128,23 +148,23 @@ src/models/Tracing.ts
128148
src/models/Tweet.ts
129149
src/models/TweetCard.ts
130150
src/models/TweetCardLegacy.ts
131-
src/models/TweetCardLegacyBindingValuesInner.ts
132-
src/models/TweetCardLegacyBindingValuesInnerValue.ts
151+
src/models/TweetCardLegacyBindingValue.ts
152+
src/models/TweetCardLegacyBindingValueData.ts
133153
src/models/TweetDetailResponse.ts
134154
src/models/TweetDetailResponseData.ts
135155
src/models/TweetEditControl.ts
156+
src/models/TweetEditControlInitial.ts
136157
src/models/TweetEditPrespective.ts
137158
src/models/TweetFavoritersResponse.ts
138159
src/models/TweetFavoritersResponseData.ts
139160
src/models/TweetLegacy.ts
140-
src/models/TweetLegacySelfThread.ts
141161
src/models/TweetResultByRestIdData.ts
142162
src/models/TweetResultByRestIdResponse.ts
143163
src/models/TweetRetweetersResponse.ts
144164
src/models/TweetRetweetersResponseData.ts
145165
src/models/TweetTombstone.ts
146166
src/models/TweetUnion.ts
147-
src/models/TweetViews.ts
167+
src/models/TweetView.ts
148168
src/models/TweetWithVisibilityResults.ts
149169
src/models/TypeName.ts
150170
src/models/UnfavoriteTweet.ts
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
twitter-openapi License
2+
3+
Copyright (c) 2023 yuki
4+
5+
<https://yuki0311.com/>
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
The Software shall not be used for any activity that involves the following types
18+
of behavior, commonly known as spam:
19+
20+
1. Sending unsolicited or excessive messages or posts.
21+
2. Aggressively following, unfollowing, or liking tweets to artificially boost engagement.
22+
3. Engaging in aggressive automated actions that disrupt or annoy other users.
23+
4. Distributing false or misleading information.
24+
25+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31+
SOFTWARE.

twitter-openapi-typescript/LICENSE.txt renamed to twitter-openapi-typescript-generated/LICENSE.AGPL

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GNU AFFERO GENERAL PUBLIC LICENSE
22
Version 3, 19 November 2007
33

4-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
55
Everyone is permitted to copy and distribute verbatim copies
66
of this license document, but changing it is not allowed.
77

@@ -643,7 +643,7 @@ the "copyright" line and a pointer to where the full notice is found.
643643
GNU Affero General Public License for more details.
644644

645645
You should have received a copy of the GNU Affero General Public License
646-
along with this program. If not, see <http://www.gnu.org/licenses/>.
646+
along with this program. If not, see <https://www.gnu.org/licenses/>.
647647

648648
Also add information on how to contact you by electronic and paper mail.
649649

@@ -658,4 +658,4 @@ specific requirements.
658658
You should also get your employer (if you work as a programmer) or school,
659659
if any, to sign a "copyright disclaimer" for the program, if necessary.
660660
For more information on this, and how to apply and follow the GNU AGPL, see
661-
<http://www.gnu.org/licenses/>.
661+
<https://www.gnu.org/licenses/>.

twitter-openapi-typescript-generated/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## twitter-openapi-typescript-generated@0.0.10
1+
## twitter-openapi-typescript-generated@0.0.11
22

33
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
44

@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
3636
_published:_
3737

3838
```
39-
npm install twitter-openapi-typescript-generated@0.0.10 --save
39+
npm install twitter-openapi-typescript-generated@0.0.11 --save
4040
```
4141

4242
_unPublished (not recommended):_

twitter-openapi-typescript-generated/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

twitter-openapi-typescript-generated/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twitter-openapi-typescript-generated",
3-
"version": "0.0.10",
3+
"version": "0.0.11",
44
"description": "OpenAPI client for twitter-openapi-typescript-generated",
55
"author": "fa0311",
66
"repository": {
@@ -16,7 +16,7 @@
1616
"devDependencies": {
1717
"typescript": "^4.0"
1818
},
19-
"license": "LGPL-3.0-only",
19+
"license": "custom license or AGPL-3.0-or-later",
2020
"keywords": [
2121
"twitter",
2222
"api",
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Twitter OpenAPI
5+
* Twitter OpenAPI(Swagger) specification
6+
*
7+
* The version of the OpenAPI document: 0.0.1
8+
* Contact: yuki@yuki0311.com
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
import { exists, mapValues } from '../runtime';
16+
/**
17+
*
18+
* @export
19+
* @interface AdditionalMediaInfo
20+
*/
21+
export interface AdditionalMediaInfo {
22+
/**
23+
*
24+
* @type {boolean}
25+
* @memberof AdditionalMediaInfo
26+
*/
27+
monetizable: boolean;
28+
}
29+
30+
/**
31+
* Check if a given object implements the AdditionalMediaInfo interface.
32+
*/
33+
export function instanceOfAdditionalMediaInfo(value: object): boolean {
34+
let isInstance = true;
35+
isInstance = isInstance && "monetizable" in value;
36+
37+
return isInstance;
38+
}
39+
40+
export function AdditionalMediaInfoFromJSON(json: any): AdditionalMediaInfo {
41+
return AdditionalMediaInfoFromJSONTyped(json, false);
42+
}
43+
44+
export function AdditionalMediaInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdditionalMediaInfo {
45+
if ((json === undefined) || (json === null)) {
46+
return json;
47+
}
48+
return {
49+
50+
'monetizable': json['monetizable'],
51+
};
52+
}
53+
54+
export function AdditionalMediaInfoToJSON(value?: AdditionalMediaInfo | null): any {
55+
if (value === undefined) {
56+
return undefined;
57+
}
58+
if (value === null) {
59+
return null;
60+
}
61+
return {
62+
63+
'monetizable': value.monetizable,
64+
};
65+
}
66+

0 commit comments

Comments
 (0)