How can I get the repo-language and topic for a Github Repo through the REST API. I looked at the documentation under - https://developer.github.com/v3/ , but could not get an answer.
Just found one way to do the search for topics as follows. Of course it needs a custom media type at moment.
From the documentation:
curl -H "Authentication: token TOKEN" \
-H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories?q=topic:ruby+topic:rails
For the language, it is simply the URL like :
https://api.github.com/repos/postgres/pgadmin4/languages
Related
Line of my .gitlab-ci.yml
IID=$(curl --verbose --request GET --header "Content-Type: application/json" --header "PRIVATE-TOKEN: ${CI_PUSH_TOKEN}" ${APP_REPO_URL}/merge_requests?author_id=xxxxxxxx\&search=${CI_COMMIT_SHORT_SHA} | jq '.[0].iid')
output jq: error (at :0): Cannot index object with number
Please refer to the documentation on Merge requests API and How to use the API to construct a properly formed cURL request with GitLab API before piping the result into jq.
There are a few things going on with your query.
First of all, according to the documentation, the /merge_requests endpoint will
Get all merge requests the authenticated user has access to.
This means that APP_REPO_URL needs to be the GitLab instance URL followed by /api/v4 and not the URL of the specific project.
curl "https://gitlab.example.com/api/v4/merge_requests"
If you need all merge requests for a given project, then you can use
curl "https://gitlab.example.com/api/v4/projects/:id/merge_requests"
where :id is the id of your project. See more at List project merge requests
Then, the search attribute is expecting either a title or a description and not a commit SHA:
Search merge requests against their title and description
I have a google cloud bucket which is having the files with the extension .jtl, I need to get these file names and paths irrespective of the nesting of folders they are in using NodeJS.
How can we do that!
I think this link might help you
https://cloud.devsite.corp.google.com/storage/docs/json_api/v1/objects/list
You can try this API, and give the preferred parameters present in that,
for example: in your case you can give delimiter as jtl, and then you can copy the curl command or http or node JS as you prefer and execute this in your google cloud platform
The command will look something like this:
curl
'https://storage.googleapis.com/storage/v1/b/xyz12345/o?delimiter=jpg&includeTrailingDelimiter=true&key=[YOUR_API_KEY]'
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]'
--header 'Accept: application/json'
--compressed
Provide your API key and Access token to be able to run this in your google cloud platform.
I am trying to allow users to sign up for my service via "login with facebook".
I have already done arrow 1-2. I need to do arrows 3-6. I have made a minimal Feathersjs example at https://github.com/morenoh149/feathers-chat-facebook-signup-api
I seem to be having trouble getting feathers-authentication and passport-facebook-token to generate the User object and sign them up. I've reviewed passport-facebook-token carefully. This answer explains that in the callback to passport-facebook-token you should create the User object. How do I do this with feathers-authentication?
When I provide the token in the body
curl localhost:3030/authentication \
--data-binary '{\
"strategy": "facebook-token", \
"access_token": "<phone token>" \
}'
I get
{"name":"NotAuthenticated",
"message":"You should provide access_token","code":401,
"className":"not-authenticated",
"data":{"message":"You should provide access_token"}
when I pass the token as a header
curl localhost:3030/authentication \
-X POST \
-H "Authorization: Bearer <access token>"
I get error
{"name":"GeneralError",
"message":"Cannot read property 'toLowerCase' of undefined",
"code":500,"className":"general-error","data":{},"errors":{}}
So I downloaded and ran the repo, I used VSCode to run the app and set break points. I created a breakpoint in the before create hooks on users.
The issue here is that the gravatar hook is expected the email to be context.data but it is in fact embedded within the facebook response. You will need to look at extracting the email from that data so that you can create a gravatar or just remove the gravatar hook altogether.
As per the LINE messaging API docs,there is API for getting user profile information. When I using that API,
curl -X GET \
-H 'Authorization: Bearer cEet0ordwd4VsUHi9jnbQuWIY+fL5RKeSGP65HEbGtGznHQ4XOaOwaTDQqwLT0bI24oFKLtMvspYvPgi4qR3Bv1oMQp+Wak2x7TRSxsL/oqQN1kIzGTk9aK4ICxU6qK4tM0KHoAkjA1ahEJSswdB04t89/1O/w1cDnyilFU=' \
https://api.line.me/v2/profile
I'm getting the following response:
{"message":null}. How can I get the bot profile information?
You will need to fulfill this conditions:
1. They have to use the latest LINE version.
2. They have to add the bot as their friend.
I'm trying to use the Microsoft Speech API as documented here: https://www.microsoft.com/cognitive-services/en-us/Speech-api/documentation/GetStarted/GetStarted-cURL
I have a key and I authenticate fine. When I try to use the service I get this error:
Parameter 'requestid' value '1234844532343434' is invalid.
I've tried different types of numbers and strings with no luck. What format is Azure looking for in requestid?
My test script looks like this:
token="..."
requestid="1234844532343434"
curl -v -X POST "https://speech.platform.bing.com/recognize?scenarios=smd&appid=D4D52672-91D7-4C74-8AD8-42B1D98141A5&locale=your_locale&device.os=your_device_os&version=3.0&format=json&instanceid=your_instance_id&requestid=${requestid}" -H "Authorization: Bearer ${token}" -H 'Content-type: audio/wav; codec="audio/pcm"; samplerate=16000' --data-binary #man1_nb.wav
Based on the documentation here, the requestid parameter's value should be a GUID.
Please try using that.