Skip to content

Commit 55625ee

Browse files
author
cl117
committed
add usesCount
1 parent 2155920 commit 55625ee

File tree

1 file changed

+134
-0
lines changed

1 file changed

+134
-0
lines changed

source/index.html.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,49 @@ fetch(Url,otherPram)
945945
.catch (error=>console.log(error))
946946
```
947947

948+
## Search Twins Count
949+
950+
`GET <URI>/twinsCount`
951+
952+
Returns the number of other components that have the same sequence.
953+
954+
```python
955+
import requests
956+
957+
response = requests.get(
958+
'<URI>/twinsCount',
959+
headers={
960+
'Accept': 'text/plain',
961+
'X-authorization': '<token>'
962+
},
963+
)
964+
965+
print(response.status_code)
966+
print(response.content)
967+
```
968+
969+
```plaintext
970+
curl -X GET -H "Accept: text/plain" -H "X-authorization: <token>" <URI>/twinsCount
971+
```
972+
973+
```javascript
974+
const fetch = require("node-fetch");
975+
const Url = '<URI>/twinsCount'
976+
const otherPram={
977+
headers:{
978+
"content-type" : "text/plain; charset=UTF-8"
979+
},
980+
method:"GET"
981+
};
982+
fetch(url)
983+
.then(res => res.text())
984+
.then(text => {
985+
const value = Number(text);
986+
console.log(value);
987+
})
988+
.catch(error => console.error(error));
989+
```
990+
948991
## Search Similar
949992

950993
`GET <URI>/similar`
@@ -985,6 +1028,52 @@ fetch(Url,otherPram)
9851028
.then(res => res.buffer()).then(buf => console.log(buf.toString()))
9861029
.catch (error=>console.log(error))
9871030
```
1031+
1032+
## Search Similar Count
1033+
1034+
`GET <URI>/similarCount`
1035+
1036+
Returns the number of other components that have similar sequences.
1037+
1038+
Note that this endpoint only works if SBOLExplorer is activated.
1039+
1040+
```plaintext
1041+
curl -X GET -H "Accept: text/plain" -H "X-authorization: <token>" <URI>/similarCount
1042+
```
1043+
1044+
```python
1045+
import requests
1046+
1047+
response = requests.get(
1048+
'<URI>/similarCount',
1049+
headers={
1050+
'Accept': 'text/plain',
1051+
'X-authorization': '<token>'
1052+
},
1053+
)
1054+
1055+
print(response.status_code)
1056+
print(response.content)
1057+
```
1058+
1059+
```javascript
1060+
const fetch = require("node-fetch");
1061+
const Url = '<URI>/similarCount'
1062+
const otherPram={
1063+
headers:{
1064+
"content-type" : "text/plain; charset=UTF-8"
1065+
},
1066+
method:"GET"
1067+
};
1068+
fetch(url)
1069+
.then(res => res.text())
1070+
.then(text => {
1071+
const value = Number(text);
1072+
console.log(value);
1073+
})
1074+
.catch(error => console.error(error));
1075+
```
1076+
9881077
## Search Uses
9891078

9901079
`GET <URI>/uses`
@@ -1037,6 +1126,51 @@ fetch(Url,otherPram)
10371126
.catch (error=>console.log(error))
10381127
```
10391128

1129+
## Search Uses Count
1130+
1131+
`GET <URI>/usesCount`
1132+
1133+
Returns the number of any other object that refers to this object, for example, if this is a component, it will return the number of all other components that use this as a sub-component.
1134+
1135+
```plaintext
1136+
curl -X GET -H "Accept: text/plain" -H "X-authorization: <token>" <URI>/usesCount
1137+
1138+
This endpoint returns the number of count.
1139+
```
1140+
1141+
```python
1142+
import requests
1143+
1144+
response = requests.get(
1145+
'<URI>/usesCount',
1146+
headers={
1147+
'Accept': 'text/plain',
1148+
'X-authorization': '<token>'
1149+
},
1150+
)
1151+
1152+
print(response.status_code)
1153+
print(response.content)
1154+
```
1155+
1156+
```javascript
1157+
const fetch = require("node-fetch");
1158+
const Url = '<SynBioHub URL>/public/bsu/BO_5629/1/usesCount'
1159+
const otherPram={
1160+
headers:{
1161+
"content-type" : "text/plain; charset=UTF-8"
1162+
},
1163+
method:"GET"
1164+
};
1165+
fetch(url)
1166+
.then(res => res.text())
1167+
.then(text => {
1168+
const value = Number(text);
1169+
console.log(value);
1170+
})
1171+
.catch(error => console.error(error));
1172+
```
1173+
10401174
## Count Objects by Type
10411175

10421176
`GET <SynBioHub URL>/<ObjectType>/count`

0 commit comments

Comments
 (0)