Fix API docs formatting (#568)

This commit is contained in:
Ben Congdon 2022-06-23 08:51:41 -07:00 committed by GitHub
parent 6cc2d8af58
commit 4a1a907b37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,7 @@ Requires no authorization.
// A list of tags on each market. Any user can add tags to any market. // A list of tags on each market. Any user can add tags to any market.
// This list also includes the predefined categories shown as filters on the home page. // This list also includes the predefined categories shown as filters on the home page.
tags: string[] tags: string[]
// Note: This url always points to https://manifold.markets, regardless of what instance the api is running on. // Note: This url always points to https://manifold.markets, regardless of what instance the api is running on.
// This url includes the creator's username, but this doesn't need to be correct when constructing valid URLs. // This url includes the creator's username, but this doesn't need to be correct when constructing valid URLs.
// i.e. https://manifold.markets/Austin/test-market is the same as https://manifold.markets/foo/test-market // i.e. https://manifold.markets/Austin/test-market is the same as https://manifold.markets/foo/test-market
@ -127,7 +127,7 @@ Requires no authorization.
isResolved: boolean isResolved: boolean
resolutionTime?: number resolutionTime?: number
resolution?: string resolution?: string
resolutionProbability?: number // Used for BINARY markets resolved to MKT resolutionProbability?: number // Used for BINARY markets resolved to MKT
} }
``` ```
@ -147,202 +147,204 @@ Requires no authorization.
```json ```json
{ {
"id":"lEoqtnDgJzft6apSKzYK", "id": "lEoqtnDgJzft6apSKzYK",
"creatorUsername":"Angela", "creatorUsername": "Angela",
"creatorName":"Angela", "creatorName": "Angela",
"createdTime":1655258914863, "createdTime": 1655258914863,
"creatorAvatarUrl":"https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476", "creatorAvatarUrl": "https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476",
"closeTime":1655265001448, "closeTime": 1655265001448,
"question":"What is good?", "question": "What is good?",
"description":"Resolves proportionally to the answer(s) which I find most compelling. (Obviously Ill refrain from giving my own answers)\n\n(Please have at it with philosophy, ethics, etc etc)\n\n\nContract resolved automatically.", "description": "Resolves proportionally to the answer(s) which I find most compelling. (Obviously Ill refrain from giving my own answers)\n\n(Please have at it with philosophy, ethics, etc etc)\n\n\nContract resolved automatically.",
"tags":[], "tags": [],
"url":"https://manifold.markets/Angela/what-is-good", "url": "https://manifold.markets/Angela/what-is-good",
"pool":null, "pool": null,
"outcomeType":"FREE_RESPONSE", "outcomeType": "FREE_RESPONSE",
"mechanism":"dpm-2", "mechanism": "dpm-2",
"volume":112, "volume": 112,
"volume7Days":212, "volume7Days": 212,
"volume24Hours":0, "volume24Hours": 0,
"isResolved":true, "isResolved": true,
"resolution":"MKT", "resolution": "MKT",
"resolutionTime":1655265001448, "resolutionTime": 1655265001448,
"answers":[ "answers": [
{ {
"createdTime":1655258941573, "createdTime": 1655258941573,
"avatarUrl":"https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476", "avatarUrl": "https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476",
"id":"1", "id": "1",
"username":"Angela", "username": "Angela",
"number":1, "number": 1,
"name":"Angela", "name": "Angela",
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"text":"ANTE", "text": "ANTE",
"userId":"qe2QqIlOkeWsbljfeF3MsxpSJ9i2", "userId": "qe2QqIlOkeWsbljfeF3MsxpSJ9i2",
"probability":0.66749733001068 "probability": 0.66749733001068
}, },
{ {
"name":"Isaac King", "name": "Isaac King",
"username":"IsaacKing", "username": "IsaacKing",
"text":"This answer", "text": "This answer",
"userId":"y1hb6k7txdZPV5mgyxPFApZ7nQl2", "userId": "y1hb6k7txdZPV5mgyxPFApZ7nQl2",
"id":"2", "id": "2",
"number":2, "number": 2,
"avatarUrl":"https://lh3.googleusercontent.com/a-/AOh14GhNVriOvxK2VUAmE-jvYZwC-XIymatzVirT0Bqb2g=s96-c", "avatarUrl": "https://lh3.googleusercontent.com/a-/AOh14GhNVriOvxK2VUAmE-jvYZwC-XIymatzVirT0Bqb2g=s96-c",
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"createdTime":1655261198074, "createdTime": 1655261198074,
"probability":0.008922214311142757 "probability": 0.008922214311142757
}, },
{ {
"createdTime":1655263226587, "createdTime": 1655263226587,
"userId":"jbgplxty4kUKIa1MmgZk22byJq03", "userId": "jbgplxty4kUKIa1MmgZk22byJq03",
"id":"3", "id": "3",
"avatarUrl":"https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FMartin%2Fgiphy.gif?alt=media&token=422ef610-553f-47e3-bf6f-c0c5cc16c70a", "avatarUrl": "https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FMartin%2Fgiphy.gif?alt=media&token=422ef610-553f-47e3-bf6f-c0c5cc16c70a",
"text":"Toyota Camry", "text": "Toyota Camry",
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"name":"Undox", "name": "Undox",
"username":"Undox", "username": "Undox",
"number":3, "number": 3,
"probability":0.008966714133143469 "probability": 0.008966714133143469
}, },
{ {
"number":4, "number": 4,
"name":"James Grugett", "name": "James Grugett",
"userId":"5LZ4LgYuySdL1huCWe7bti02ghx2", "userId": "5LZ4LgYuySdL1huCWe7bti02ghx2",
"text":"Utility (Defined by your personal utility function.)", "text": "Utility (Defined by your personal utility function.)",
"createdTime":1655264793224, "createdTime": 1655264793224,
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"username":"JamesGrugett", "username": "JamesGrugett",
"id":"4", "id": "4",
"avatarUrl":"https://lh3.googleusercontent.com/a-/AOh14GjC83uMe-fEfzd6QvxiK6ZqZdlMytuHxevgMYIkpAI=s96-c", "avatarUrl": "https://lh3.googleusercontent.com/a-/AOh14GjC83uMe-fEfzd6QvxiK6ZqZdlMytuHxevgMYIkpAI=s96-c",
"probability":0.09211463154147384 "probability": 0.09211463154147384
} }
], ],
"comments":[ "comments": [
{ {
"id":"ZdHIyfQazHyl8nI0ENS7", "id": "ZdHIyfQazHyl8nI0ENS7",
"userId":"qe2QqIlOkeWsbljfeF3MsxpSJ9i2", "userId": "qe2QqIlOkeWsbljfeF3MsxpSJ9i2",
"createdTime":1655265807433, "createdTime": 1655265807433,
"text":"ok what\ni did not resolve this intentionally", "text": "ok what\ni did not resolve this intentionally",
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"userName":"Angela", "userName": "Angela",
"userAvatarUrl":"https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476", "userAvatarUrl": "https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476",
"userUsername":"Angela" "userUsername": "Angela"
}, },
{ {
"userName":"James Grugett", "userName": "James Grugett",
"userUsername":"JamesGrugett", "userUsername": "JamesGrugett",
"id":"F7fvHGhTiFal8uTsUc9P", "id": "F7fvHGhTiFal8uTsUc9P",
"userAvatarUrl":"https://lh3.googleusercontent.com/a-/AOh14GjC83uMe-fEfzd6QvxiK6ZqZdlMytuHxevgMYIkpAI=s96-c","replyToCommentId":"ZdHIyfQazHyl8nI0ENS7", "userAvatarUrl": "https://lh3.googleusercontent.com/a-/AOh14GjC83uMe-fEfzd6QvxiK6ZqZdlMytuHxevgMYIkpAI=s96-c",
"text":"@Angela Sorry! There was an error that automatically resolved several markets that were created in the last few hours.", "replyToCommentId": "ZdHIyfQazHyl8nI0ENS7",
"createdTime":1655266286514, "text": "@Angela Sorry! There was an error that automatically resolved several markets that were created in the last few hours.",
"userId":"5LZ4LgYuySdL1huCWe7bti02ghx2", "createdTime": 1655266286514,
"contractId":"lEoqtnDgJzft6apSKzYK" "userId": "5LZ4LgYuySdL1huCWe7bti02ghx2",
"contractId": "lEoqtnDgJzft6apSKzYK"
}, },
{ {
"userId":"qe2QqIlOkeWsbljfeF3MsxpSJ9i2", "userId": "qe2QqIlOkeWsbljfeF3MsxpSJ9i2",
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"id":"PIHhXy5hLHSgW8uoUD0Q", "id": "PIHhXy5hLHSgW8uoUD0Q",
"userName":"Angela", "userName": "Angela",
"text":"lmk if anyone lost manna from this situation and i'll try to fix it", "text": "lmk if anyone lost manna from this situation and i'll try to fix it",
"userUsername":"Angela", "userUsername": "Angela",
"createdTime":1655277581308, "createdTime": 1655277581308,
"userAvatarUrl":"https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476" "userAvatarUrl": "https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476"
},{ },
"userAvatarUrl":"https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476", {
"userName":"Angela", "userAvatarUrl": "https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FAngela%2F50463444807_edfd4598d6_o.jpeg?alt=media&token=ef44e13b-2e6c-4498-b9c4-8e38bdaf1476",
"text":"from my end it looks like no one did", "userName": "Angela",
"replyToCommentId":"PIHhXy5hLHSgW8uoUD0Q", "text": "from my end it looks like no one did",
"createdTime":1655287149528, "replyToCommentId": "PIHhXy5hLHSgW8uoUD0Q",
"userUsername":"Angela", "createdTime": 1655287149528,
"id":"5slnWEQWwm6dHjDi6oiH", "userUsername": "Angela",
"contractId":"lEoqtnDgJzft6apSKzYK", "id": "5slnWEQWwm6dHjDi6oiH",
"userId":"qe2QqIlOkeWsbljfeF3MsxpSJ9i2" "contractId": "lEoqtnDgJzft6apSKzYK",
"userId": "qe2QqIlOkeWsbljfeF3MsxpSJ9i2"
} }
], ],
"bets":[ "bets": [
{ {
"outcome":"0", "outcome": "0",
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"fees":{ "fees": {
"liquidityFee":0, "liquidityFee": 0,
"creatorFee":0, "creatorFee": 0,
"platformFee":0 "platformFee": 0
}, },
"isAnte":true, "isAnte": true,
"shares":100, "shares": 100,
"probAfter":1, "probAfter": 1,
"amount":100, "amount": 100,
"userId":"IPTOzEqrpkWmEzh6hwvAyY9PqFb2", "userId": "IPTOzEqrpkWmEzh6hwvAyY9PqFb2",
"createdTime":1655258914863, "createdTime": 1655258914863,
"probBefore":0, "probBefore": 0,
"id":"2jNZqnwoEQL7WDTTAWDP" "id": "2jNZqnwoEQL7WDTTAWDP"
}, },
{ {
"shares":173.20508075688772, "shares": 173.20508075688772,
"fees":{ "fees": {
"platformFee":0, "platformFee": 0,
"liquidityFee":0, "liquidityFee": 0,
"creatorFee":0 "creatorFee": 0
}, },
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"probBefore":0, "probBefore": 0,
"createdTime":1655258941573, "createdTime": 1655258941573,
"loanAmount":0, "loanAmount": 0,
"userId":"qe2QqIlOkeWsbljfeF3MsxpSJ9i2", "userId": "qe2QqIlOkeWsbljfeF3MsxpSJ9i2",
"amount":100, "amount": 100,
"outcome":"1", "outcome": "1",
"probAfter":0.75, "probAfter": 0.75,
"id":"xuc3JoiNkE8lXPh15mUb" "id": "xuc3JoiNkE8lXPh15mUb"
}, },
{ {
"userId":"y1hb6k7txdZPV5mgyxPFApZ7nQl2", "userId": "y1hb6k7txdZPV5mgyxPFApZ7nQl2",
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"loanAmount":0, "loanAmount": 0,
"probAfter":0.009925496893641248, "probAfter": 0.009925496893641248,
"id":"8TBlzPtOdO0q5BgSyRbi", "id": "8TBlzPtOdO0q5BgSyRbi",
"createdTime":1655261198074, "createdTime": 1655261198074,
"shares":20.024984394500787, "shares": 20.024984394500787,
"amount":1, "amount": 1,
"outcome":"2", "outcome": "2",
"probBefore":0, "probBefore": 0,
"fees":{ "fees": {
"liquidityFee":0, "liquidityFee": 0,
"creatorFee":0, "creatorFee": 0,
"platformFee":0 "platformFee": 0
} }
}, },
{ {
"probAfter":0.00987648269777473, "probAfter": 0.00987648269777473,
"outcome":"3", "outcome": "3",
"id":"9vdwes6s9QxbYZUBhHs4", "id": "9vdwes6s9QxbYZUBhHs4",
"createdTime":1655263226587, "createdTime": 1655263226587,
"shares":20.074859899884732, "shares": 20.074859899884732,
"amount":1, "amount": 1,
"loanAmount":0, "loanAmount": 0,
"fees":{ "fees": {
"liquidityFee":0, "liquidityFee": 0,
"platformFee":0, "platformFee": 0,
"creatorFee":0 "creatorFee": 0
}, },
"userId":"jbgplxty4kUKIa1MmgZk22byJq03", "userId": "jbgplxty4kUKIa1MmgZk22byJq03",
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"probBefore":0 "probBefore": 0
}, },
{ {
"createdTime":1655264793224, "createdTime": 1655264793224,
"fees":{ "fees": {
"creatorFee":0, "creatorFee": 0,
"liquidityFee":0, "liquidityFee": 0,
"platformFee":0 "platformFee": 0
}, },
"probAfter":0.09211463154147384, "probAfter": 0.09211463154147384,
"amount":10, "amount": 10,
"id":"BehiSGgk1wAkIWz1a8L4", "id": "BehiSGgk1wAkIWz1a8L4",
"userId":"5LZ4LgYuySdL1huCWe7bti02ghx2", "userId": "5LZ4LgYuySdL1huCWe7bti02ghx2",
"contractId":"lEoqtnDgJzft6apSKzYK", "contractId": "lEoqtnDgJzft6apSKzYK",
"loanAmount":0, "loanAmount": 0,
"probBefore":0, "probBefore": 0,
"outcome":"4", "outcome": "4",
"shares":64.34283176858165 "shares": 64.34283176858165
} }
] ]
} }