Skip to content

Commit

Permalink
updated action
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Campbell authored and Cameron Campbell committed May 17, 2024
1 parent 4c3b032 commit e36d58e
Show file tree
Hide file tree
Showing 143 changed files with 3,082 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/buildDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,22 @@ import type { ArrowFunction, CallExpression, Directory, Identifier, Node, Parame
//////////////////////////////////////////////////////////////////////////////////


// [ Private Functions ] /////////////////////////////////////////////////////////
const splitAtLastOccurrence = (str: string, separator: string) => {
const lastIndex = str.lastIndexOf(separator);
if (lastIndex === -1) {
return [str];
}

const beforeLast = str.substring(0, lastIndex);
const afterLast = str.substring(lastIndex + separator.length);
return [beforeLast, afterLast];
}
//////////////////////////////////////////////////////////////////////////////////


// [ Variables ] /////////////////////////////////////////////////////////////////
const root = Bun.main
const root = `${splitAtLastOccurrence(Bun.main, "/openblox/")[0]}/openblox`
const docsSitePages = `${root}/docs_site/pages`

const project = new Project({
Expand Down
6 changes: 6 additions & 0 deletions docs_site/pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

import './styles.css'

export default function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
}
10 changes: 10 additions & 0 deletions docs_site/pages/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"cloud": {
"type": "page",
"title": "Cloud APIs"
},
"classic": {
"type": "page",
"title": "Classic APIs"
}
}
11 changes: 11 additions & 0 deletions docs_site/pages/classic/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"friends": "ClassicFriendsApi",
"games": "ClassicGamesApi",
"groups": "ClassicGroupsApi",
"premiumFeatures": "ClassicPremiumFeaturesApi",
"subscriptions": "ClassicSubscriptionsApi",
"talent": "ClassicTalentApi",
"thumbnails": "ClassicThumbnailsApi",
"universes": "ClassicUniversesApi",
"users": "ClassicUsersApi"
}
10 changes: 10 additions & 0 deletions docs_site/pages/classic/friends/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"friendsMetadata": "friendsMetadata",
"authenticatedUserFriendsCount": "authenticatedUserFriendsCount",
"authenticatedUserFriendRequests": "authenticatedUserFriendRequests",
"authenticatedUserFriendRequestsCount": "authenticatedUserFriendRequestsCount",
"friendsList": "friendsList",
"friendsCount": "friendsCount",
"findFriends": "findFriends",
"userfollowersCount": "userfollowersCount"
}
24 changes: 24 additions & 0 deletions docs_site/pages/classic/friends/authenticatedUserFriendRequests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# authenticatedUserFriendRequests
Gets friends requests sent to the authenticated user.


## Parameters
| Name | Type | Description |
| :-------- | :---- | :---------- |
| limit | ? | limit |
| sortOrder | ? | sortOrder |
| cursor | ? | cursor |



## Example
```js copy showLineNumbers
const { data: requests } = await ClassicFriendsApi.authenticatedUserFriendRequests({ limit: 10 });
```

## Endpoint
```ansi
GET /v1/my/friends/requests
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# authenticatedUserFriendRequestsCount
Gets the amount of friend requests the authenticated user has.



## Example
```js copy showLineNumbers
const { data: requestsCount } = await ClassicFriendsApi.authenticatedUserFriendRequestsCount();
```

## Endpoint
```ansi
GET /v1/user/friend-requests/count
```

16 changes: 16 additions & 0 deletions docs_site/pages/classic/friends/authenticatedUserFriendsCount.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# authenticatedUserFriendsCount
Gets the amount of friends the authenticated user has.



## Example
```js copy showLineNumbers
const { data: metadata } = await ClassicFriendsApi.friendsMetadata();
```

## Endpoint
```ansi
GET /v1/my/friends/count
```

25 changes: 25 additions & 0 deletions docs_site/pages/classic/friends/findFriends.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# findFriends
Gets a paginated list of all friends for the specified user.


## Parameters
| Name | Type | Description |
| :------- | :--------- | :----------------------------------------------- |
| userId | Identifier | The id of the user to get friends for. |
| userSort | ? | Specifies how to sort the returned friends. |
| limit | ? | The number of results to be returned |
| cursor | ? | The paging cursor for the previous or next page. |



## Example
```js copy showLineNumbers
const { data: friends } = await ClassicFriendsApi.userfollowersCount({ userId: 45348281 });
```

## Endpoint
```ansi
GET /v1/users/{userId}/friends/find
```

22 changes: 22 additions & 0 deletions docs_site/pages/classic/friends/friendsCount.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

# friendsCount
Gets friends count for a specified user.


## Parameters
| Name | Type | Description |
| :----- | :--------- | :------------------------------------- |
| userId | Identifier | The id of the user to get friends for. |



## Example
```js copy showLineNumbers
const { data: count } = await ClassicFriendsApi.friendsCount({ userId: 45348281 });
```

## Endpoint
```ansi
GET /v1/users/{userId}/friends/count
```

23 changes: 23 additions & 0 deletions docs_site/pages/classic/friends/friendsList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# friendsList
Gets friends for a specified user.


## Parameters
| Name | Type | Description |
| :------- | :--------- | :------------------------------------------ |
| userId | Identifier | The id of the user to get friends for. |
| userSort | ? | Specifies how to sort the returned friends. |



## Example
```js copy showLineNumbers
const { data: friends } = await ClassicFriendsApi.friendsList({ userId: 45348281 });
```

## Endpoint
```ansi
GET /v1/users/{userId}/friends
```

16 changes: 16 additions & 0 deletions docs_site/pages/classic/friends/friendsMetadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# friendsMetadata
Gets friends metadata.



## Example
```js copy showLineNumbers
const { data: metadata } = await ClassicFriendsApi.friendsMetadata();
```

## Endpoint
```ansi
GET /v1/metadata
```

22 changes: 22 additions & 0 deletions docs_site/pages/classic/friends/userfollowersCount.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

# userfollowersCount
Gets the followers count for a specific user.


## Parameters
| Name | Type | Description |
| :----- | :--------- | :------------------------------------------------ |
| userId | Identifier | The id of the user to get the follower count for. |



## Example
```js copy showLineNumbers
const { data: followersCount } = await ClassicFriendsApi.userfollowersCount({ userId: 45348281 });
```

## Endpoint
```ansi
GET /v1/users/{userId}/followers/count
```

4 changes: 4 additions & 0 deletions docs_site/pages/classic/games/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"gamesInfo": "gamesInfo",
"userGames": "userGames"
}
25 changes: 25 additions & 0 deletions docs_site/pages/classic/games/gamesInfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# gamesInfo
Gets a list of games info from universe ids.


## Parameters
| Name | Type | Description |
| :-------- | :---- | :----------------------------------------------- |
| userId | | The id of the user to get games for. |
| limit | | The maximum amount of games to return. |
| sortOrder | | The order the results are sorted it. |
| cursor | | the paging cursor for the previous or next page. |



## Example
```js copy showLineNumbers

```

## Endpoint
```ansi
GET /v1/games
```

25 changes: 25 additions & 0 deletions docs_site/pages/classic/games/userGames.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# userGames
Gets a list of games made by a specific user.


## Parameters
| Name | Type | Description |
| :-------- | :--------- | :----------------------------------------------- |
| userId | Identifier | The id of the user to get games for. |
| limit | ? | The maximum amount of games to return. |
| sortOrder | ? | The order the results are sorted it. |
| cursor | ? | the paging cursor for the previous or next page. |



## Example
```js copy showLineNumbers

```

## Endpoint
```ansi
GET /v2/users/{userId}/games
```

54 changes: 54 additions & 0 deletions docs_site/pages/classic/groups/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"groupInfo": "groupInfo",
"groupAuditLog": "groupAuditLog",
"groupNameHistory": "groupNameHistory",
"groupSettings": "groupSettings",
"setGroupSettings": "setGroupSettings",
"groupsConfigMetadata": "groupsConfigMetadata",
"groupsMetadata": "groupsMetadata",
"groupsPolicyInfo": "groupsPolicyInfo",
"setGroupDescription": "setGroupDescription",
"setGroupShout": "setGroupShout",
"setGroupIcon": "setGroupIcon",
"batchDeclineGroupJoinRequests": "batchDeclineGroupJoinRequests",
"groupJoinRequests": "groupJoinRequests",
"batchAcceptGroupJoinRequests": "batchAcceptGroupJoinRequests",
"declineGroupJoinRequest": "declineGroupJoinRequest",
"groupJoinRequestInfo": "groupJoinRequestInfo",
"acceptGroupJoinRequest": "acceptGroupJoinRequest",
"authenticatedUserGroupMembershipInfo": "authenticatedUserGroupMembershipInfo",
"groupRoles": "groupRoles",
"groupMembersWithRole": "groupMembersWithRole",
"groupMembers": "groupMembers",
"authenticatedUserPendingGroups": "authenticatedUserPendingGroups",
"groupsThatUsersFriendsAreIn": "groupsThatUsersFriendsAreIn",
"allGroupRolesForUser_V1": "allGroupRolesForUser_V1",
"removeGroupMember": "removeGroupMember",
"updateGroupMemberRole": "updateGroupMemberRole",
"groupPayoutRestrictionsInfo": "groupPayoutRestrictionsInfo",
"groupPayoutsInfo": "groupPayoutsInfo",
"groupRelationships": "groupRelationships",
"batchDeclineGroupRelationshipRequests": "batchDeclineGroupRelationshipRequests",
"groupRelationshipRequests": "groupRelationshipRequests",
"batchAcceptGroupRelationshipRequests": "batchAcceptGroupRelationshipRequests",
"removeGroupRelationship": "removeGroupRelationship",
"requestGroupRelationship": "requestGroupRelationship",
"declineGroupRelationshipRequest": "declineGroupRelationshipRequest",
"acceptGroupRelationshipRequest": "acceptGroupRelationshipRequest",
"groupPermissionsForRole": "groupPermissionsForRole",
"setGroupRolePermissions": "setGroupRolePermissions",
"groupGuestRolePermissions": "groupGuestRolePermissions",
"groupPermissionsForAllRoles": "groupPermissionsForAllRoles",
"groupSocialLinks": "groupSocialLinks",
"addGroupSocialLink": "addGroupSocialLink",
"removeGroupSocialLink": "removeGroupSocialLink",
"updateGroupSocialLink": "updateGroupSocialLink",
"groupWallPosts_V1": "groupWallPosts_V1",
"authenticatedUserSubscribeToGroupWallNotificationEvents": "authenticatedUserSubscribeToGroupWallNotificationEvents",
"removeGroupWallPost": "removeGroupWallPost",
"removeAllGroupWallPostMadeByUser": "removeAllGroupWallPostMadeByUser",
"groupSearch": "groupSearch",
"groupLookupSearch": "groupLookupSearch",
"groupSearchMetadata": "groupSearchMetadata",
"groupRolesFromIds": "groupRolesFromIds"
}
23 changes: 23 additions & 0 deletions docs_site/pages/classic/groups/acceptGroupJoinRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# acceptGroupJoinRequest
Accepts a join request.


## Parameters
| Name | Type | Description |
| :------ | :--------- | :------------------------------------------------ |
| groupId | Identifier | The id of the group to accept a join request for. |
| userId | Identifier | The id of the user to accept. |



## Example
```js copy showLineNumbers
const { data: success } = await ClassicGroupsApi.acceptGroupJoinRequest({ groupId: 5850082, userId: 2655994471 });
```

## Endpoint
```ansi
POST /v1/groups/{groupId}/join-requests/users/${userId}
```

Loading

0 comments on commit e36d58e

Please sign in to comment.