Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab.com API issue #34

Closed
meyskens opened this issue Apr 19, 2014 · 3 comments
Closed

GitLab.com API issue #34

meyskens opened this issue Apr 19, 2014 · 3 comments

Comments

@meyskens
Copy link

I tried to create a new project using the example but it seems I get this error every time:
PHP Fatal error: Uncaught exception 'Gitlab\Exception\ErrorException' with message '400 (Bad request) "name" not given'

I use the hosted GitLab at gitlab.com.

@m4tthumphrey
Copy link
Contributor

Can you post the exact code your using?

@meyskens
Copy link
Author

<?php
require 'vendor/autoload.php';
$client = new \Gitlab\Client('http:https://gitlab.com/api/v3/'); // change here
$client->authenticate('NOTGIVINGMYKEY', \Gitlab\Client::AUTH_URL_TOKEN); // change here

$project = $client->api('projects')->create('test',array(
  'description' => 'This is a project',
  'issues_enabled' => false
));

@m4tthumphrey
Copy link
Contributor

Hmm looks ok to me. I haven't been able to test it with the hosted solution as I don't have an account. I can only assume that they are running a different version of the API? Although I don't see why they would and even if they are, why they aren't recognising the name parameter...

I'll have to have a proper look in the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants