Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/amitsaxena098/OpenKnowledgeStream/llms.txt

Use this file to discover all available pages before exploring further.

The Query class is the top-level deserialization target for the Wikipedia Recent Changes API JSON response. It wraps a RecentChanges object, mirroring the two-level nesting that the Wikipedia API uses to return query results.

Source

package Wikicommon.models;

import lombok.Data;

@Data
public class Query {
    private RecentChanges query;
}

Fields

query
RecentChanges
The nested query object from the Wikipedia API response. Contains a RecentChanges instance, which in turn holds the list of individual Change records returned by the API call.

Example

The full Wikipedia Recent Changes API JSON structure that Jackson deserializes into a Query instance:
{
  "query": {
    "recentchanges": [
      {
        "type": "edit",
        "title": "Albert Einstein",
        "pageid": 736,
        "tags": []
      }
    ]
  }
}

Notes

WikipediaClient.getRecentChanges() returns an instance of Query after deserializing the raw HTTP response body from the Wikipedia API. Callers unwrap the list of changes via query.getQuery().getRecentChanges().
The @Data annotation from Lombok generates getters, setters, equals, hashCode, and toString implementations at compile time.
This class is provided by the wiki-common module (com.as:wiki-common:0.0.1-SNAPSHOT).

Build docs developers (and LLMs) love