Wordpress WP-API Failed to run - wordpress-rest-api

I'm installing a clean wordpress site and trying to learn on how WP-API works. i read the documentation on http://v2.wp-api.org .. it said ".. Want to get your site’s posts? Simply send a GET request to /wp-json/wp/v2/posts .."
So i test on a clean install of wordpress:
http://unityofwomen.com/wp-json/wp/v2/posts
But there's error "rest_no_route"..
do i miss something ? accessing http://unityofwomen.com/wp-json/ has result though..

Got a confirmation from the author that Wordpress has embed wp-json into the core but not the route.. so we need to install the routes ourself.
But i'm still wondering why WP not include the base route into the core

Related

Is there a REST API for Jenkins plugins?

I'm trying to write a script that quickly checks if our Jenkins plugins are up to date. I know that this is a built in feature in Jenkins, but for security reasons, our Jenkins instance doesn't have internet access.
I know that I can get a lot of information about a plugin, including version, from:
https://plugins.jenkins.io/<name-of-plugin>
However, I can't get it to return anything other than HTML. I could scrape the HTML for the version number, but if there is a stable API that returns JSON or similar, that would be preferred. I'm pretty sure Jenkins isn't scraping HTML to check for updates, so the API must exist. Does anyone know where it is?
There seem to be two solutions available. I ended up scraping:
https://updates.jenkins.io/download/plugins/<name-of-plugin>
The latest version is always in the second column of the second row, so scraping is trivial. It works well most of the time, but sometimes the connection is refused, which I assume might be due to of the volume of requests sent by the script.
Another option that I found is to download the following JSON file:
https://updates.jenkins.io/current/update-center.actual.json
It is currently 1.7MB and contains information about the latest version of all Jenkins plugins. It also contains meta data like dependencies, which allows your script to validate that all dependencies are satisfied.
Unfortunately I haven't found a way to download JSON for individual plugins, so you either have to scrape HTML for individual plugins or download a massive JSON for all plugins.
Update: I found the API:
https://plugins.jenkins.io/api/plugin/<name-of-plugin>
And I also found the source code and the documentation:
https://github.com/jenkins-infra/plugin-site-api

How to integrate Facebook AccountKit with Parse Server

The new Facebook AccountKit, looks like a great way to add passwordless authentication to a mobile app.
Parse Server is fast becoming a de-facto choice for mobile back-ends.
Is adding AccountKit support underway somewhere with Parse Server? If so where? Where should I look or ask? (Yes, I've tried!)
Any suggestions for how to get started? E.g. is it possible to add to the existing oauth support in Parse Server?
Just trying to make sure that this doesn't exist somewhere obvious already and/or that efforts aren't underway before I jump in... (or, possibly, that this is just a dumb idea and that's why I can't find it!)
Sorry for being late
Yes its possible you can use a new parse server module called "parse-server-accountkit-auth"
In the parse-server-example folder run
npm install -S parse-server-accountkit-auth
This will make install this module in node_modules folder. Don't change anything in the module.
Edit the index.js file in parse-server-example and configure ParseServer with oauth, you can find this in parse server docs
Then use this code where you are defining your data (e.g in your index.js of parse-server-example)
oauth: {
accountkit: {
module: 'parse-server-accountkit-auth',
appSecret: 'YOUR_APP_SECRET'
},},
Hope this helps.

Downloading entire sites for offline viewing

I'd like to download a website to whiten it into a private network.
I know it's being done a lot with StackOverflow itself, I just don't know how to do it myself.
The specific site I want to download is CPP-QUIZ with all the questions and explanations.
I've tried doing it with HTTrack, but it seems to download just a couple of questions and then it fails.
What is usually done to do something like this?
You can use a tool like wget or curl. If the site had an index then you could use wget's recursive option. It seems like it does not (the homepage just seems to choose a question at random for that specific site).
In that case you can just start generating commands:
wget http://cppquiz.org/quiz/question/1
wget http://cppquiz.org/quiz/question/2
wget http://cppquiz.org/quiz/question/3
And so on. After running those commands you would have the files downloaded to the directory you ran the commands from.
I was also wondering the same thing & stumbled upon this Github project this week called Diskernet
it saves resources to your file system as your browsing using your web browser (when launched with the diskernet binary or CLI tool)
It's still an early project, but I found I already started making use of it this week & it worked great!
https://github.com/i5ik/Diskernet
Highlights:
is able to download Single Page Web applications (doesn't use wget)
once you download a site, it works offline
There are alternative tools like SiteSucker, but I found Diskernet to work even for websites that require authentication

Can't install zfcuser on Zend Framework 2

I'm starting a new project, so I installed the skeleton zf2 project from github.
I followed the instruction provided here https://github.com/ZF-Commons/ZfcUser, to install zfcuser.
I used composer to install zfcuser and changed the required files.
But although I can see the indexpage of the skeleton project at "http://localhost/Test/public/", when I go to "http://localhost/Test/User" all I see is default page saying
Not Found
The requested URL /Teste/public/user was not found on this server.
It's my first time installing modules on zf2. What am I missing?
Remember: All requests will be served out of public/index.
That means if you set up a route like "/some/route" your current setup will have you go to http://localhost/Test/public/some/route
So the ZfcUser route will be: http://localhost/Test/public/user
If you can, try pointing your host root dir to /public.

Permission error media TYPO3 6.1.0

I've got a Problem i can't upload any Media files in my Typo3 Backend.
If i choose a file in the Element browser I get a Internal Server Error 500, If i use upload i get this Error: Link Error
I also can't see the Thumbnails
I made the Files tyo3conf, fileadmin, typo3 and typo3temp with 777 access.
Imagemagick is also running and shows me all Test images.
Can anybody help me, I dont't know what do do.
The TYPO3 Version I use is: 6.1.0
I get a Internal Server Error 500
Have a look in your TYPO3 log accessible by the "log" backend module. If you can't find something there, get access to your vhost error log from the webserver. Usually, some sort of view capabilities are provided by some hoster control panels. Since it is a server error, you usually have to check the server log.
I also can't see the Thumbnails
Check your install tool again and play with the different options there. Also check that, in install tool > basic configuration, you have set the default paths (maybe let the install tool search again). You may see the test images, but if they're not generated correctly or display warnings, it may not work correctly.
Generally said: It is not really programming related, so IMHO not a fit for stackoverflow.com. Ask for help on irc.freenode.net in the #typo3 channel, this may be more helpful.