MCPcopy Index your code
hub / github.com/praw-dev/praw / create

Method create

praw/models/helpers.py:254–282  ·  view source on GitHub ↗

Create a new :class:`.LiveThread`. :param title: The title of the new :class:`.LiveThread`. :param description: The new :class:`.LiveThread`'s description. :param nsfw: Indicate whether this thread is not safe for work (default: ``False``). :param resourc

(
        self,
        title: str,
        *,
        description: str | None = None,
        nsfw: bool = False,
        resources: str | None = None,
    )

Source from the content-addressed store, hash-verified

252 return LiveThread(self._reddit, id=id)
253
254 def create(
255 self,
256 title: str,
257 *,
258 description: str | None = None,
259 nsfw: bool = False,
260 resources: str | None = None,
261 ) -> models.LiveThread:
262 """Create a new :class:`.LiveThread`.
263
264 :param title: The title of the new :class:`.LiveThread`.
265 :param description: The new :class:`.LiveThread`'s description.
266 :param nsfw: Indicate whether this thread is not safe for work (default:
267 ``False``).
268 :param resources: Markdown formatted information that is useful for the
269 :class:`.LiveThread`.
270
271 :returns: The new :class:`.LiveThread` object.
272
273 """
274 return self._reddit.post(
275 API_PATH["livecreate"],
276 data={
277 "description": description,
278 "nsfw": nsfw,
279 "resources": resources,
280 "title": title,
281 },
282 )
283
284 def info(self, ids: list[str]) -> Iterator[models.LiveThread]:
285 """Fetch information about each live thread in ``ids``.

Callers 15

test_live_createMethod · 0.45
test_delete_noteMethod · 0.45
test_createMethod · 0.45
test_createMethod · 0.45
test_createMethod · 0.45
test_createMethod · 0.45
test_create__existsMethod · 0.45

Calls 1

postMethod · 0.80

Tested by 15

test_live_createMethod · 0.36
test_delete_noteMethod · 0.36
test_createMethod · 0.36
test_createMethod · 0.36
test_createMethod · 0.36
test_createMethod · 0.36
test_create__existsMethod · 0.36