> ## Documentation Index
> Fetch the complete documentation index at: https://docs.benzinga.com/llms.txt
> Use this file to discover all available pages before exploring further.

# الأخبار

> news()

[\< رجوع](/ar/sdks/languages/java#news)

<div id="overview">
  ## نظرة عامة
</div>

<div id="available-operations">
  ### العمليات المتاحة
</div>

* [get](#get) - جلب الأخبار
* [getRemoved](#getremoved) - جلب الأخبار المحذوفة

<div id="get">
  ## get
</div>

جلب الأخبار

<div id="example-usage">
  ### مثال على الاستخدام
</div>

```java theme={null}
package hello.world;

import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.operations.GetNewsRequest;
import org.benzinga.BZClient.models.operations.GetNewsResponse;

public class Application {

    public static void main(String[] args) throws Exception {

        Bzclient sdk = Bzclient.builder()
                .apiKeyAuth("<YOUR_API_KEY_HERE>")
            .build();

        GetNewsRequest req = GetNewsRequest.builder()
                .build();

        GetNewsResponse res = sdk.news().get()
                .request(req)
                .call();

        if (res.twoHundredApplicationJsonApiNewsItems().isPresent()) {
            // معالجة الرد
        }
    }
}
```

### المعلمات

| المعلمة   | النوع                                                       | مطلوب                | الوصف                               |
| --------- | ----------------------------------------------------------- | -------------------- | ----------------------------------- |
| `request` | [GetNewsRequest](../../models/operations/GetNewsRequest.md) | :heavy\_check\_mark: | كائن الطلب المستخدم لهذا الاستدعاء. |

<div id="response">
  ### الاستجابة
</div>

**[GetNewsResponse](../../models/operations/GetNewsResponse.md)**

<div id="errors">
  ### الأخطاء
</div>

| نوع الخطأ                  | رمز الحالة | نوع المحتوى |
| -------------------------- | ---------- | ----------- |
| models/errors/APIException | 4XX, 5XX   | */*         |

<div id="getremoved">
  ## getRemoved
</div>

جلب الأخبار التي تمت إزالتها

<div id="example-usage">
  ### مثال على الاستخدام
</div>

```java theme={null}
package hello.world;

import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.operations.GetRemovedNewsResponse;

public class Application {

    public static void main(String[] args) throws Exception {

        Bzclient sdk = Bzclient.builder()
                .apiKeyAuth("<YOUR_API_KEY_HERE>")
            .build();

        GetRemovedNewsResponse res = sdk.news().getRemoved()
                .updatedSince("<value>")
                .pageSize(948405L)
                .page(766235L)
                .call();

        if (res.twoHundredApplicationJsonApiNewsRemovedItems().isPresent()) {
            // معالجة الاستجابة
        }
    }
}
```

<div id="parameters">
  ### المعاملات
</div>

| المعامل        | النوع               | إلزامي               | الوصف      |
| -------------- | ------------------- | -------------------- | ---------- |
| `updatedSince` | *Optional\<String>* | :heavy\_minus\_sign: | محدَّث منذ |
| `pageSize`     | *Optional\<Long>*   | :heavy\_minus\_sign: | حجم الصفحة |
| `page`         | *Optional\<Long>*   | :heavy\_minus\_sign: | الصفحة     |

<div id="response">
  ### الاستجابة
</div>

**[GetRemovedNewsResponse](../../models/operations/GetRemovedNewsResponse.md)**

<div id="errors">
  ### الأخطاء
</div>

| نوع الخطأ                  | رمز الحالة | نوع المحتوى |
| -------------------------- | ---------- | ----------- |
| models/errors/APIException | 4XX, 5XX   | */*         |
