'}" \\
+--region us-east-1 \\
+--body "{ 'query': '{ title(id: \"tt0120338\") { ratingsSummary { aggregateRating voteCount } } }' }"
+ """,
+ language="bash",
+)
+
+# Sample GraphQL Query
+st.subheader("π» Sample Query")
+st.write("Hereβs a sample GraphQL query to retrieve the IMDb rating for *Titanic*:")
+
+st.markdown(
+ """
+
+{
+ title(id: "tt0120338") {
+ ratingsSummary {
+ aggregateRating
+ voteCount
+ }
+ }
+}
+
+""",
+ unsafe_allow_html=True,
+)
+
+# Response Example
+st.subheader("π Sample API Response")
+st.write('{\n "data": {\n "title": {\n "ratingsSummary": {')
+st.write(' "aggregateRating": 7.9,\n "voteCount": 1133828')
+st.write(" }\n }\n }\n}")
+
+# Additional Code Snippets
+st.subheader("π Additional Code Snippets")
+
+# Code Snippet for Postman Request
+st.write("**Making Requests via Postman**")
+st.markdown(
+ """
+1. **Set Method**: Use `POST` method.
+2. **Request URL**: `https://api-fulfill.dataexchange.us-east-1.amazonaws.com/v1`
+3. **Headers**:
+ - `Content-Type`: `application/json`
+ - `x-api-key`: ``
+4. **Body (GraphQL Query)**:
+ ```graphql
+ {
+ title(id: "tt0120338") {
+ ratingsSummary {
+ aggregateRating
+ voteCount
+ }
+ }
+ }
+ ```
+ """,
+ unsafe_allow_html=True,
+)
+
+# Code Snippet for Python API Call
+st.write("**Python Code to Make an API Call**")
+st.code(
+ """
+import requests
+
+url = "https://api-fulfill.dataexchange.us-east-1.amazonaws.com/v1"
+headers = {
+ "x-api-key": "",
+ "Content-Type": "application/json"
+}
+query = '''
+{
+ title(id: "tt0120338") {
+ ratingsSummary {
+ aggregateRating
+ voteCount
+ }
+ }
+}
+'''
+response = requests.post(url, headers=headers, data=query)
+print(response.json())
+""",
+ language="python",
+)
+
+# Example Use Cases
+st.subheader("π Example Use Cases")
+st.markdown(
+ """
+1. **Retrieve Ratings**: Query title ratings and vote counts.
+2. **Box Office Data**: Access box office gross data.
+3. **Cast and Crew**: Fetch top cast or crew details for movies and shows.
+4. **Search Functionality**: Use keywords to find specific titles or names.
+5. **Real-time Data Access**: Display data updates as they become available on IMDb.
+""",
+ unsafe_allow_html=True,
+)
+
+# Footer
+st.markdown("---")
+st.markdown(
+ "For further assistance, contact support at support@imdbapi.com",
+ unsafe_allow_html=True,
+)