'cmtitle' => 'Categoria:Software con licenza GNU GPL',
] );
foreach( $queries as $query ) {
print_r( $query );
}
```
-### Edit API query
+### Login and Edit API query
```php
$wiki = \wm\WikipediaIt::instance();
$user = '';
$password = '';
$wiki->login( $user, $password );
$wiki->edit( [
'title' => 'Special:Nothing',
'text' => 'My wikitext',
'summary' => 'My edit summary',
] );
```
+Note that you can also call `login()` without parameters if you specify a global username and password on the top of your script:
+
+```php
+\mw\API::$DEFAULT_USERNAME = '':
+\mw\API::$DEFAULT_PASSWORD = '';
+```
+
### Wikidata SPARQL query
What if you want to list all the [cats from Wikidata](https://query.wikidata.org/#%23Cats%0ASELECT%20%3Fitem%20%3FitemLabel%20%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20wdt%3AP31%20wd%3AQ146.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D)?